Commit 3ef9413b authored by jiangpeng's avatar jiangpeng

privacy:support multiple asset in exec query

* update ShowAmountsOfUTXO and ShowUTXOs4SpecifiedAmount
parent fe44a8a1
syntax = "proto3"; syntax = "proto3";
package types; package types;
//CycleBoundaryInfo cycle边界信息 // CycleBoundaryInfo cycle边界信息
message CycleBoundaryInfo{ message CycleBoundaryInfo {
int64 cycle = 1; int64 cycle = 1;
int64 stopHeight = 2; int64 stopHeight = 2;
string stopHash = 3; string stopHash = 3;
} }
//SuperNode 超级节点信息 // SuperNode 超级节点信息
message SuperNode{ message SuperNode {
bytes address = 1; bytes address = 1;
bytes pubKey = 2; bytes pubKey = 2;
} }
//VoteItem 投票信息 // VoteItem 投票信息
message VoteItem { message VoteItem {
int32 votedNodeIndex = 1; //被投票的节点索引 int32 votedNodeIndex = 1; //被投票的节点索引
bytes votedNodeAddress = 2; //被投票的节点地址 bytes votedNodeAddress = 2; //被投票的节点地址
...@@ -34,7 +33,7 @@ message VoteItem { ...@@ -34,7 +33,7 @@ message VoteItem {
repeated SuperNode noVrfValidators = 14; repeated SuperNode noVrfValidators = 14;
} }
//DPosVote Dpos共识的节点投票,为达成共识用。 // DPosVote Dpos共识的节点投票,为达成共识用。
message DPosVote { message DPosVote {
VoteItem voteItem = 1; VoteItem voteItem = 1;
int64 voteTimestamp = 2; //发起投票的时间 int64 voteTimestamp = 2; //发起投票的时间
...@@ -43,23 +42,23 @@ message DPosVote { ...@@ -43,23 +42,23 @@ message DPosVote {
bytes signature = 5; //投票者签名 bytes signature = 5; //投票者签名
} }
//DPosVoteReply 投票响应。 // DPosVoteReply 投票响应。
message DPosVoteReply { message DPosVoteReply {
DPosVote vote = 1; DPosVote vote = 1;
} }
//DPosNotify Dpos委托节点出块周期结束时,通知其他节点进行高度确认及新节点投票。 // DPosNotify Dpos委托节点出块周期结束时,通知其他节点进行高度确认及新节点投票。
message DPosNotify { message DPosNotify {
VoteItem vote = 1; VoteItem vote = 1;
int64 heightStop = 2; //新节点负责出块的结束高度 int64 heightStop = 2; //新节点负责出块的结束高度
bytes hashStop = 3; //新节点负责出块的结束hash bytes hashStop = 3; //新节点负责出块的结束hash
int64 notifyTimestamp = 4; //发起通知的时间 int64 notifyTimestamp = 4; //发起通知的时间
int32 notifyNodeIndex = 5; //通知节点的索引 int32 notifyNodeIndex = 5; //通知节点的索引
bytes notifyNodeAddress= 6; //通知节点的地址 bytes notifyNodeAddress = 6; //通知节点的地址
bytes signature = 7; //通知节点的签名 bytes signature = 7; //通知节点的签名
} }
//DPosCBInfo Cycle boundary注册信息。 // DPosCBInfo Cycle boundary注册信息。
message DPosCBInfo { message DPosCBInfo {
int64 cycle = 1; int64 cycle = 1;
int64 stopHeight = 2; int64 stopHeight = 2;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
syntax = "proto3"; syntax = "proto3";
//import "common.proto"; // import "common.proto";
import "board.proto"; import "board.proto";
import "project.proto"; import "project.proto";
import "rule.proto"; import "rule.proto";
......
...@@ -8,7 +8,6 @@ import "lcommon.proto"; ...@@ -8,7 +8,6 @@ import "lcommon.proto";
package types; package types;
message AutonomyProposalBoard { message AutonomyProposalBoard {
ProposalBoard propBoard = 1; ProposalBoard propBoard = 1;
// 投票该提案的规则 // 投票该提案的规则
......
...@@ -8,7 +8,6 @@ import "lcommon.proto"; ...@@ -8,7 +8,6 @@ import "lcommon.proto";
package types; package types;
message AutonomyProposalChange { message AutonomyProposalChange {
ProposalChange propChange = 1; ProposalChange propChange = 1;
// 投票该提案的规则 // 投票该提案的规则
......
...@@ -13,12 +13,12 @@ message Collateralize { ...@@ -13,12 +13,12 @@ message Collateralize {
int64 balance = 7; //放贷剩余金额(ccny) int64 balance = 7; //放贷剩余金额(ccny)
repeated BorrowRecord borrowRecords = 8; //借贷记录 repeated BorrowRecord borrowRecords = 8; //借贷记录
repeated BorrowRecord InvalidRecords = 9; //失效的借贷记录 repeated BorrowRecord InvalidRecords = 9; //失效的借贷记录
int32 status = 10;//当期借贷的状态,是否关闭 int32 status = 10; //当期借贷的状态,是否关闭
int64 latestLiquidationPrice = 11;//最高清算价格 int64 latestLiquidationPrice = 11; //最高清算价格
int64 period = 12;//借贷最大期限 int64 period = 12; //借贷最大期限
int64 latestExpireTime = 13;//最近超期时间 int64 latestExpireTime = 13; //最近超期时间
int64 collBalance = 14;//抵押bty int64 collBalance = 14; //抵押bty
int32 preStatus = 15;//上一个状态 int32 preStatus = 15; //上一个状态
} }
// 借出记录 // 借出记录
...@@ -32,17 +32,17 @@ message BorrowRecord { ...@@ -32,17 +32,17 @@ message BorrowRecord {
int32 status = 7; //抵押状态,是否被清算 int32 status = 7; //抵押状态,是否被清算
int64 liquidateTime = 8; //清算时间 int64 liquidateTime = 8; //清算时间
int64 expireTime = 9; //超时清算时间 int64 expireTime = 9; //超时清算时间
int32 preStatus = 10;//上一次抵押状态,用于告警恢复 int32 preStatus = 10; //上一次抵押状态,用于告警恢复
string recordId = 11;//借贷id,标识一次借出记录 string recordId = 11; //借贷id,标识一次借出记录
string collateralizeId = 12;//放贷id string collateralizeId = 12; //放贷id
} }
// 资产价格记录 // 资产价格记录
message AssetPriceRecord { message AssetPriceRecord {
int64 recordTime = 1; //价格记录时间 int64 recordTime = 1; //价格记录时间
int64 btyPrice = 2; //bty价格 int64 btyPrice = 2; // bty价格
int64 btcPrice = 3; //btc价格 int64 btcPrice = 3; // btc价格
int64 ethPrice = 4; //eth价格 int64 ethPrice = 4; // eth价格
} }
// action // action
...@@ -114,7 +114,7 @@ message ReceiptCollateralize { ...@@ -114,7 +114,7 @@ message ReceiptCollateralize {
string accountAddr = 3; string accountAddr = 3;
string recordId = 4; string recordId = 4;
int32 status = 5; int32 status = 5;
} }
// exec_local 放贷记录信息列表 // exec_local 放贷记录信息列表
message CollateralizeRecords { message CollateralizeRecords {
...@@ -128,7 +128,7 @@ message ReqCollateralizeInfo { ...@@ -128,7 +128,7 @@ message ReqCollateralizeInfo {
// 返回一期放贷信息 // 返回一期放贷信息
message RepCollateralizeCurrentInfo { message RepCollateralizeCurrentInfo {
int32 status = 1;//当期借贷的状态,是否关闭 int32 status = 1; //当期借贷的状态,是否关闭
int64 totalBalance = 2; //当期可借贷的总金额(ccny) int64 totalBalance = 2; //当期可借贷的总金额(ccny)
int64 debtCeiling = 3; //单用户可借出的限额(ccny) int64 debtCeiling = 3; //单用户可借出的限额(ccny)
int64 liquidationRatio = 4; //清算比例 int64 liquidationRatio = 4; //清算比例
...@@ -137,8 +137,8 @@ message RepCollateralizeCurrentInfo { ...@@ -137,8 +137,8 @@ message RepCollateralizeCurrentInfo {
int64 balance = 7; //剩余可借贷金额(ccny) int64 balance = 7; //剩余可借贷金额(ccny)
int64 period = 8; //合约期限 int64 period = 8; //合约期限
string collateralizeId = 9; //放贷ID string collateralizeId = 9; //放贷ID
int64 collBalance = 10;//抵押bty int64 collBalance = 10; //抵押bty
repeated BorrowRecord borrowRecords = 11;//借贷记录 repeated BorrowRecord borrowRecords = 11; //借贷记录
} }
// 根据ID列表查询多期放贷信息 // 根据ID列表查询多期放贷信息
......
...@@ -2,7 +2,7 @@ syntax = "proto3"; ...@@ -2,7 +2,7 @@ syntax = "proto3";
package types; package types;
//CandidatorInfo 候选节点信息 // CandidatorInfo 候选节点信息
message CandidatorInfo { message CandidatorInfo {
bytes pubkey = 1; //候选节点的公钥 bytes pubkey = 1; //候选节点的公钥
string address = 2; //后续节点的地址 string address = 2; //后续节点的地址
...@@ -19,8 +19,8 @@ message CandidatorInfo { ...@@ -19,8 +19,8 @@ message CandidatorInfo {
repeated DposVoter voters = 13; repeated DposVoter voters = 13;
} }
//DposVoter 投票者信息 // DposVoter 投票者信息
message DposVoter{ message DposVoter {
string fromAddr = 1; string fromAddr = 1;
bytes pubkey = 2; //候选节点的公钥 bytes pubkey = 2; //候选节点的公钥
int64 votes = 3; //投给候选节点的票数,不能超过锁在合约中的未使用票数 int64 votes = 3; //投给候选节点的票数,不能超过锁在合约中的未使用票数
...@@ -28,7 +28,7 @@ message DposVoter{ ...@@ -28,7 +28,7 @@ message DposVoter{
int64 time = 5; int64 time = 5;
} }
//Candidator 候选节点信息 // Candidator 候选节点信息
message Candidator { message Candidator {
bytes pubkey = 1; //候选节点的公钥 bytes pubkey = 1; //候选节点的公钥
string address = 2; //后续节点的地址 string address = 2; //后续节点的地址
...@@ -37,33 +37,33 @@ message Candidator { ...@@ -37,33 +37,33 @@ message Candidator {
int64 status = 5; //候选节点的状态,0:注册,1:当选,2:取消注册 int64 status = 5; //候选节点的状态,0:注册,1:当选,2:取消注册
} }
//DposCandidatorRegist 注册Dpos候选节点,必须抵押一定数量的币,比如:10000个币 // DposCandidatorRegist 注册Dpos候选节点,必须抵押一定数量的币,比如:10000个币
message DposCandidatorRegist{ message DposCandidatorRegist {
string pubkey = 1; //候选节点的公钥 string pubkey = 1; //候选节点的公钥
string address = 2; //候选节点的地址 string address = 2; //候选节点的地址
string IP = 3; //候选节点的共识IP地址 string IP = 3; //候选节点的共识IP地址
} }
//DposCandidatorCancelRegist 注销Dpos候选节点,解冻抵押的币 // DposCandidatorCancelRegist 注销Dpos候选节点,解冻抵押的币
message DposCandidatorCancelRegist{ message DposCandidatorCancelRegist {
string pubkey = 1; //候选节点的公钥 string pubkey = 1; //候选节点的公钥
string address = 2; //候选节点的地址 string address = 2; //候选节点的地址
} }
//DposVote 为Dpos候选节点投票 // DposVote 为Dpos候选节点投票
message DposVote{ message DposVote {
string fromAddr = 1; string fromAddr = 1;
string pubkey = 2; //候选节点的公钥 string pubkey = 2; //候选节点的公钥
int64 votes = 3; //投给候选节点的票数,不能超过锁在合约中的未使用票数 int64 votes = 3; //投给候选节点的票数,不能超过锁在合约中的未使用票数
} }
//DposCancelVote 撤销为Dpos候选节点投票 // DposCancelVote 撤销为Dpos候选节点投票
message DposCancelVote{ message DposCancelVote {
string pubkey = 1; //候选节点的公钥 string pubkey = 1; //候选节点的公钥
int64 index = 3; int64 index = 3;
} }
//DposVoteAction DposVote动作 // DposVoteAction DposVote动作
message DposVoteAction { message DposVoteAction {
oneof value { oneof value {
DposCandidatorRegist regist = 1; DposCandidatorRegist regist = 1;
...@@ -84,16 +84,14 @@ message DposVoteAction { ...@@ -84,16 +84,14 @@ message DposVoteAction {
int32 ty = 15; int32 ty = 15;
} }
//CandidatorQuery 候选节点查询 // CandidatorQuery 候选节点查询
message CandidatorQuery{ message CandidatorQuery {
repeated string pubkeys = 1; //候选节点公钥集合 repeated string pubkeys = 1; //候选节点公钥集合
int32 topN = 2; //topN int32 topN = 2; // topN
int32 ty = 3; //1:按公钥集合查询,2:按topN票数查询 int32 ty = 3; // 1:按公钥集合查询,2:按topN票数查询
} }
// JSONCandidator 候选节点Json格式信息
//JSONCandidator 候选节点Json格式信息
message JSONCandidator { message JSONCandidator {
string pubkey = 1; //候选节点的公钥 string pubkey = 1; //候选节点的公钥
string address = 2; //后续节点的地址 string address = 2; //后续节点的地址
...@@ -102,19 +100,19 @@ message JSONCandidator { ...@@ -102,19 +100,19 @@ message JSONCandidator {
int64 status = 5; //候选节点的状态,0:注册,1:当选,2:取消注册 int64 status = 5; //候选节点的状态,0:注册,1:当选,2:取消注册
} }
//CandidatorReply 候选节点查询响应 // CandidatorReply 候选节点查询响应
message CandidatorReply{ message CandidatorReply {
repeated JSONCandidator candidators = 1; //候选节点 repeated JSONCandidator candidators = 1; //候选节点
} }
//DposVoteQuery 投票查询 // DposVoteQuery 投票查询
message DposVoteQuery{ message DposVoteQuery {
repeated string pubkeys = 1; //候选节点的公钥,如果为空,则查询所有,否则,查询该地址给具体候选节点的投票 repeated string pubkeys = 1; //候选节点的公钥,如果为空,则查询所有,否则,查询该地址给具体候选节点的投票
string addr = 2; //要查询的地址 string addr = 2; //要查询的地址
} }
//JSONDposVoter Json格式的投票者信息 // JSONDposVoter Json格式的投票者信息
message JSONDposVoter{ message JSONDposVoter {
string fromAddr = 1; string fromAddr = 1;
string pubkey = 2; //候选节点的公钥 string pubkey = 2; //候选节点的公钥
int64 votes = 3; //投给候选节点的票数,不能超过锁在合约中的未使用票数 int64 votes = 3; //投给候选节点的票数,不能超过锁在合约中的未使用票数
...@@ -122,12 +120,12 @@ message JSONDposVoter{ ...@@ -122,12 +120,12 @@ message JSONDposVoter{
int64 time = 5; int64 time = 5;
} }
//DposVoteReply 投票查询响应 // DposVoteReply 投票查询响应
message DposVoteReply{ message DposVoteReply {
repeated JSONDposVoter votes = 1; //某地址对具体候选节点的投票情况 repeated JSONDposVoter votes = 1; //某地址对具体候选节点的投票情况
} }
//ReceiptCandicator 候选者收据信息 // ReceiptCandicator 候选者收据信息
message ReceiptCandicator { message ReceiptCandicator {
int64 Index = 1; int64 Index = 1;
bytes pubkey = 2; bytes pubkey = 2;
...@@ -142,51 +140,50 @@ message ReceiptCandicator { ...@@ -142,51 +140,50 @@ message ReceiptCandicator {
int64 time = 11; int64 time = 11;
} }
//DposVrfM VrfM信息 // DposVrfM VrfM信息
message DposVrfM{ message DposVrfM {
int64 Index = 1; int64 Index = 1;
bytes pubkey = 2; bytes pubkey = 2;
int64 cycle = 3; int64 cycle = 3;
int64 height = 4; int64 height = 4;
bytes m = 5; //vrf的输入 bytes m = 5; // vrf的输入
int64 time = 6; int64 time = 6;
int64 cycleStart = 7; int64 cycleStart = 7;
int64 cycleMiddle = 8; int64 cycleMiddle = 8;
int64 cycleStop = 9; int64 cycleStop = 9;
} }
//DposVrfRP VrfRP信息 // DposVrfRP VrfRP信息
message DposVrfRP{ message DposVrfRP {
int64 Index = 1; int64 Index = 1;
bytes pubkey = 2; bytes pubkey = 2;
int64 cycle = 3; int64 cycle = 3;
int64 height = 4; int64 height = 4;
bytes m = 5; //vrf的输入 bytes m = 5; // vrf的输入
bytes r = 6; //vrf的hash bytes r = 6; // vrf的hash
bytes p = 7; //vrf的hash的proof bytes p = 7; // vrf的hash的proof
int64 time = 8; int64 time = 8;
int64 cycleStart = 9; int64 cycleStart = 9;
int64 cycleMiddle = 10; int64 cycleMiddle = 10;
int64 cycleStop = 11; int64 cycleStop = 11;
} }
//DposVrfMRegist VrfM注册请求 // DposVrfMRegist VrfM注册请求
message DposVrfMRegist{ message DposVrfMRegist {
string pubkey = 1; string pubkey = 1;
int64 cycle = 2; int64 cycle = 2;
string m = 3; //vrf的输入 string m = 3; // vrf的输入
} }
//DposVrfRPRegist VrfRP注册请求 // DposVrfRPRegist VrfRP注册请求
message DposVrfRPRegist{ message DposVrfRPRegist {
string pubkey = 1; string pubkey = 1;
int64 cycle = 2; int64 cycle = 2;
string r = 3; //vrf的hash string r = 3; // vrf的hash
string p = 4; //vrf的hash的proof string p = 4; // vrf的hash的proof
} }
// ReceiptVrf vrf收据信息
//ReceiptVrf vrf收据信息
message ReceiptVrf { message ReceiptVrf {
int64 Index = 1; int64 Index = 1;
bytes pubkey = 2; bytes pubkey = 2;
...@@ -202,7 +199,7 @@ message ReceiptVrf { ...@@ -202,7 +199,7 @@ message ReceiptVrf {
int64 cycleStop = 12; int64 cycleStop = 12;
} }
//VrfInfo vrf信息 // VrfInfo vrf信息
message VrfInfo { message VrfInfo {
int64 Index = 1; int64 Index = 1;
bytes pubkey = 2; bytes pubkey = 2;
...@@ -214,15 +211,15 @@ message VrfInfo { ...@@ -214,15 +211,15 @@ message VrfInfo {
int64 time = 9; int64 time = 9;
} }
//DposVrfQuery vrf查询请求 // DposVrfQuery vrf查询请求
message DposVrfQuery{ message DposVrfQuery {
repeated string pubkeys = 1; repeated string pubkeys = 1;
int64 ty = 2; int64 ty = 2;
int64 timestamp = 3; int64 timestamp = 3;
int64 cycle = 4; int64 cycle = 4;
} }
//JSONVrfInfo json格式的vrf信息 // JSONVrfInfo json格式的vrf信息
message JSONVrfInfo { message JSONVrfInfo {
int64 Index = 1; int64 Index = 1;
string pubkey = 2; string pubkey = 2;
...@@ -234,12 +231,12 @@ message JSONVrfInfo { ...@@ -234,12 +231,12 @@ message JSONVrfInfo {
int64 time = 9; int64 time = 9;
} }
//DposVrfReply vrf查询响应 // DposVrfReply vrf查询响应
message DposVrfReply{ message DposVrfReply {
repeated JSONVrfInfo vrf = 1; repeated JSONVrfInfo vrf = 1;
} }
//DposCycleBoundaryInfo cycle边界信息 // DposCycleBoundaryInfo cycle边界信息
message DposCycleBoundaryInfo { message DposCycleBoundaryInfo {
int64 cycle = 1; int64 cycle = 1;
int64 stopHeight = 2; int64 stopHeight = 2;
...@@ -248,7 +245,7 @@ message DposCycleBoundaryInfo { ...@@ -248,7 +245,7 @@ message DposCycleBoundaryInfo {
bytes signature = 5; bytes signature = 5;
} }
//DposCBInfo cycle边界记录请求消息 // DposCBInfo cycle边界记录请求消息
message DposCBInfo { message DposCBInfo {
int64 cycle = 1; int64 cycle = 1;
int64 stopHeight = 2; int64 stopHeight = 2;
...@@ -257,7 +254,7 @@ message DposCBInfo { ...@@ -257,7 +254,7 @@ message DposCBInfo {
string signature = 5; string signature = 5;
} }
//DposCBQuery cycle边界记录查询请求 // DposCBQuery cycle边界记录查询请求
message DposCBQuery { message DposCBQuery {
int64 cycle = 1; int64 cycle = 1;
int64 stopHeight = 2; int64 stopHeight = 2;
...@@ -265,12 +262,12 @@ message DposCBQuery { ...@@ -265,12 +262,12 @@ message DposCBQuery {
int32 ty = 4; int32 ty = 4;
} }
//DposCBReply cycle边界记录查询响应 // DposCBReply cycle边界记录查询响应
message DposCBReply { message DposCBReply {
DposCBInfo cbInfo = 1; DposCBInfo cbInfo = 1;
} }
//ReceiptCB CycleBoundary收据信息 // ReceiptCB CycleBoundary收据信息
message ReceiptCB { message ReceiptCB {
int64 Index = 1; int64 Index = 1;
bytes pubkey = 2; bytes pubkey = 2;
...@@ -284,8 +281,8 @@ message ReceiptCB { ...@@ -284,8 +281,8 @@ message ReceiptCB {
DposCycleBoundaryInfo cbInfo = 10; DposCycleBoundaryInfo cbInfo = 10;
} }
//TopNCandidator topN候选者 // TopNCandidator topN候选者
message TopNCandidator{ message TopNCandidator {
repeated Candidator cands = 1; repeated Candidator cands = 1;
bytes hash = 2; bytes hash = 2;
int64 height = 3; int64 height = 3;
...@@ -293,30 +290,30 @@ message TopNCandidator{ ...@@ -293,30 +290,30 @@ message TopNCandidator{
bytes signature = 5; bytes signature = 5;
} }
//TopNCandidators topN候选者(复数) // TopNCandidators topN候选者(复数)
message TopNCandidators{ message TopNCandidators {
repeated TopNCandidator candsVotes = 1; repeated TopNCandidator candsVotes = 1;
int64 version = 2; int64 version = 2;
int64 status = 3; int64 status = 3;
repeated Candidator finalCands = 4; repeated Candidator finalCands = 4;
} }
//TopNCandidatorRegist topN候选者注册请求 // TopNCandidatorRegist topN候选者注册请求
message TopNCandidatorRegist{ message TopNCandidatorRegist {
TopNCandidator cand = 1; TopNCandidator cand = 1;
} }
//TopNCandidatorsQuery topN候选者查询请求 // TopNCandidatorsQuery topN候选者查询请求
message TopNCandidatorsQuery{ message TopNCandidatorsQuery {
int64 version = 1; int64 version = 1;
} }
//TopNCandidatorsReply topN候选者查询响应 // TopNCandidatorsReply topN候选者查询响应
message TopNCandidatorsReply{ message TopNCandidatorsReply {
TopNCandidators topN = 1; TopNCandidators topN = 1;
} }
//ReceiptTopN topN注册的收据信息 // ReceiptTopN topN注册的收据信息
message ReceiptTopN { message ReceiptTopN {
int64 Index = 1; int64 Index = 1;
bytes pubkey = 2; bytes pubkey = 2;
......
syntax = "proto3"; syntax = "proto3";
package types; package types;
message Exchange { message Exchange {}
}
message ExchangeAction { message ExchangeAction {
oneof value { oneof value {
...@@ -143,13 +142,10 @@ message OrderList { ...@@ -143,13 +142,10 @@ message OrderList {
string primaryKey = 2; string primaryKey = 2;
} }
// exchange执行票据日志
//exchange执行票据日志
message ReceiptExchange { message ReceiptExchange {
Order order = 1; Order order = 1;
repeated Order matchOrders = 2; repeated Order matchOrders = 2;
int64 index = 3; int64 index = 3;
} }
service exchange { service exchange {}
}
...@@ -4,7 +4,7 @@ import "transaction.proto"; ...@@ -4,7 +4,7 @@ import "transaction.proto";
package types; package types;
//GuessGame 竞猜游戏详情 // GuessGame 竞猜游戏详情
message GuessGame { message GuessGame {
string gameID = 1; //游戏ID string gameID = 1; //游戏ID
int32 status = 2; //游戏的状态:创建->投注->截止投注->开奖 int32 status = 2; //游戏的状态:创建->投注->截止投注->开奖
...@@ -34,13 +34,13 @@ message GuessGame { ...@@ -34,13 +34,13 @@ message GuessGame {
bool drivenByAdmin = 26; bool drivenByAdmin = 26;
} }
//GuessPlayer 竞猜玩家信息 // GuessPlayer 竞猜玩家信息
message GuessPlayer { message GuessPlayer {
string addr = 1; string addr = 1;
GuessBet bet = 2; GuessBet bet = 2;
} }
//GuessBet 竞猜下注信息 // GuessBet 竞猜下注信息
message GuessBet { message GuessBet {
string option = 1; string option = 1;
int64 betsNumber = 2; int64 betsNumber = 2;
...@@ -50,21 +50,21 @@ message GuessBet { ...@@ -50,21 +50,21 @@ message GuessBet {
int64 preIndex = 6; int64 preIndex = 6;
} }
//GuessBetStat 竞猜下注统计信息 // GuessBetStat 竞猜下注统计信息
message GuessBetStat { message GuessBetStat {
int64 totalBetTimes = 1; int64 totalBetTimes = 1;
int64 totalBetsNumber = 2; int64 totalBetsNumber = 2;
repeated GuessBetStatItem items = 3; repeated GuessBetStatItem items = 3;
} }
//GuessBetStat 竞猜下注子选项统计信息 // GuessBetStat 竞猜下注子选项统计信息
message GuessBetStatItem { message GuessBetStatItem {
string option = 1; string option = 1;
int64 betsNumber = 2; int64 betsNumber = 2;
int64 betsTimes = 3; int64 betsTimes = 3;
} }
//GuessGameAction 竞猜游戏动作 // GuessGameAction 竞猜游戏动作
message GuessGameAction { message GuessGameAction {
oneof value { oneof value {
GuessGameStart start = 1; GuessGameStart start = 1;
...@@ -77,13 +77,13 @@ message GuessGameAction { ...@@ -77,13 +77,13 @@ message GuessGameAction {
int32 ty = 7; int32 ty = 7;
} }
//GuessGameStart 游戏创建 // GuessGameStart 游戏创建
message GuessGameStart{ message GuessGameStart {
string topic = 1; string topic = 1;
string options = 2; string options = 2;
string category = 3; string category = 3;
int64 maxBetHeight = 4; int64 maxBetHeight = 4;
int64 maxBetsOneTime= 5; int64 maxBetsOneTime = 5;
int64 maxBetsNumber = 6; int64 maxBetsNumber = 6;
int64 devFeeFactor = 7; //开发者抽成比例 int64 devFeeFactor = 7; //开发者抽成比例
string devFeeAddr = 8; //开发者地址 string devFeeAddr = 8; //开发者地址
...@@ -93,36 +93,36 @@ message GuessGameStart{ ...@@ -93,36 +93,36 @@ message GuessGameStart{
bool drivenByAdmin = 12; bool drivenByAdmin = 12;
} }
//GuessGameBet 参与游戏下注 // GuessGameBet 参与游戏下注
message GuessGameBet{ message GuessGameBet {
string gameID = 1; string gameID = 1;
string option = 2; string option = 2;
int64 betsNum = 3; int64 betsNum = 3;
} }
//GuessGameStopBet 游戏停止下注 // GuessGameStopBet 游戏停止下注
message GuessGameStopBet{ message GuessGameStopBet {
string gameID = 1; string gameID = 1;
} }
//GuessGameAbort 游戏异常终止,退还下注 // GuessGameAbort 游戏异常终止,退还下注
message GuessGameAbort{ message GuessGameAbort {
string gameID = 1; string gameID = 1;
} }
//GuessGamePublish 游戏结果揭晓 // GuessGamePublish 游戏结果揭晓
message GuessGamePublish{ message GuessGamePublish {
string gameID = 1; string gameID = 1;
string result = 2; string result = 2;
} }
//GuessGameQuery 查询游戏结果 // GuessGameQuery 查询游戏结果
message GuessGameQuery{ message GuessGameQuery {
string gameID = 1; string gameID = 1;
uint32 ty = 2; uint32 ty = 2;
} }
//QueryGuessGameInfo 游戏信息查询消息 // QueryGuessGameInfo 游戏信息查询消息
message QueryGuessGameInfo { message QueryGuessGameInfo {
string gameID = 1; string gameID = 1;
string addr = 2; string addr = 2;
...@@ -133,22 +133,22 @@ message QueryGuessGameInfo { ...@@ -133,22 +133,22 @@ message QueryGuessGameInfo {
string primaryKey = 7; string primaryKey = 7;
} }
//ReplyGuessGameInfo 游戏信息查询响应消息 // ReplyGuessGameInfo 游戏信息查询响应消息
message ReplyGuessGameInfo { message ReplyGuessGameInfo {
GuessGame game = 1; GuessGame game = 1;
} }
//QueryGuessGameInfos 游戏信息列表查询消息 // QueryGuessGameInfos 游戏信息列表查询消息
message QueryGuessGameInfos { message QueryGuessGameInfos {
repeated string gameIDs = 1; repeated string gameIDs = 1;
} }
//ReplyGuessGameInfos 游戏信息列表查询响应消息 // ReplyGuessGameInfos 游戏信息列表查询响应消息
message ReplyGuessGameInfos { message ReplyGuessGameInfos {
repeated GuessGame games = 1; repeated GuessGame games = 1;
} }
//ReceiptGuessGame 竞猜游戏收据信息 // ReceiptGuessGame 竞猜游戏收据信息
message ReceiptGuessGame { message ReceiptGuessGame {
int64 startIndex = 1; int64 startIndex = 1;
string gameID = 2; string gameID = 2;
...@@ -166,7 +166,7 @@ message ReceiptGuessGame { ...@@ -166,7 +166,7 @@ message ReceiptGuessGame {
GuessGame game = 14; GuessGame game = 14;
} }
//UserBet 用户下注信息 // UserBet 用户下注信息
message UserBet { message UserBet {
int64 startIndex = 1; int64 startIndex = 1;
int64 index = 2; int64 index = 2;
...@@ -176,7 +176,7 @@ message UserBet { ...@@ -176,7 +176,7 @@ message UserBet {
int64 betsNumber = 6; int64 betsNumber = 6;
} }
//GuessStartTxReq 构造start交易的请求 // GuessStartTxReq 构造start交易的请求
message GuessStartTxReq { message GuessStartTxReq {
string topic = 1; string topic = 1;
string options = 2; string options = 2;
...@@ -193,7 +193,7 @@ message GuessStartTxReq { ...@@ -193,7 +193,7 @@ message GuessStartTxReq {
int64 fee = 13; int64 fee = 13;
} }
//GuessBetTxReq 构造bet交易的请求 // GuessBetTxReq 构造bet交易的请求
message GuessBetTxReq { message GuessBetTxReq {
string gameID = 1; string gameID = 1;
string option = 2; string option = 2;
...@@ -201,19 +201,19 @@ message GuessBetTxReq { ...@@ -201,19 +201,19 @@ message GuessBetTxReq {
int64 fee = 4; int64 fee = 4;
} }
//GuessStopBetTxReq 构造stopBet交易的请求 // GuessStopBetTxReq 构造stopBet交易的请求
message GuessStopBetTxReq { message GuessStopBetTxReq {
string gameID = 1; string gameID = 1;
int64 fee = 2; int64 fee = 2;
} }
//GuessAbortTxReq 构造abort交易的请求 // GuessAbortTxReq 构造abort交易的请求
message GuessAbortTxReq { message GuessAbortTxReq {
string gameID = 1; string gameID = 1;
int64 fee = 2; int64 fee = 2;
} }
//GuessPublishTxReq 构造publish交易的请求 // GuessPublishTxReq 构造publish交易的请求
message GuessPublishTxReq { message GuessPublishTxReq {
string gameID = 1; string gameID = 1;
string result = 2; string result = 2;
...@@ -232,7 +232,6 @@ message GuessGameRecords { ...@@ -232,7 +232,6 @@ message GuessGameRecords {
string primaryKey = 2; string primaryKey = 2;
} }
// service guess 为guess 对外提供服务的接口 // service guess 为guess 对外提供服务的接口
service guess { service guess {
//游戏开始 //游戏开始
......
...@@ -13,12 +13,12 @@ message Issuance { ...@@ -13,12 +13,12 @@ message Issuance {
repeated DebtRecord debtRecords = 7; //大户抵押记录 repeated DebtRecord debtRecords = 7; //大户抵押记录
repeated DebtRecord invalidRecords = 8; //大户抵押记录 repeated DebtRecord invalidRecords = 8; //大户抵押记录
int32 status = 9; //当期发行的状态,是否关闭 int32 status = 9; //当期发行的状态,是否关闭
int64 latestLiquidationPrice = 10;//最高清算价格 int64 latestLiquidationPrice = 10; //最高清算价格
int64 period = 11;//发行最大期限 int64 period = 11; //发行最大期限
int64 latestExpireTime = 12;//最近超期时间 int64 latestExpireTime = 12; //最近超期时间
int64 createTime = 13;//创建时间 int64 createTime = 13; //创建时间
int64 balance = 14;//剩余可发行ccny int64 balance = 14; //剩余可发行ccny
string issuerAddr = 15;//发行地址 string issuerAddr = 15; //发行地址
} }
// 抵押记录 // 抵押记录
...@@ -32,15 +32,15 @@ message DebtRecord { ...@@ -32,15 +32,15 @@ message DebtRecord {
int32 status = 7; //抵押状态,是否被清算 int32 status = 7; //抵押状态,是否被清算
int64 liquidateTime = 8; //清算时间 int64 liquidateTime = 8; //清算时间
int64 expireTime = 9; //超时清算时间 int64 expireTime = 9; //超时清算时间
int32 preStatus = 10;//上一次抵押状态,用于告警恢复 int32 preStatus = 10; //上一次抵押状态,用于告警恢复
string debtId = 11;//借贷id string debtId = 11; //借贷id
string issuId = 12;//发行id string issuId = 12; //发行id
} }
// 资产价格记录 // 资产价格记录
message IssuanceAssetPriceRecord { message IssuanceAssetPriceRecord {
int64 recordTime = 1; //价格记录时间 int64 recordTime = 1; //价格记录时间
int64 btyPrice = 2; //bty价格 int64 btyPrice = 2; // bty价格
} }
// action // action
...@@ -127,7 +127,7 @@ message RepIssuanceCurrentInfo { ...@@ -127,7 +127,7 @@ message RepIssuanceCurrentInfo {
int64 debtValue = 7; //产生的ccny数量 int64 debtValue = 7; //产生的ccny数量
int64 period = 8; //发行最大期限 int64 period = 8; //发行最大期限
string issuId = 9; //发行ID string issuId = 9; //发行ID
int64 createTime = 10;//创建时间 int64 createTime = 10; //创建时间
} }
// 根据ID列表查询多期发行信息 // 根据ID列表查询多期发行信息
......
...@@ -9,9 +9,9 @@ message Create { ...@@ -9,9 +9,9 @@ message Create {
// call action // call action
message Call { message Call {
string name = 1; //exec name string name = 1; // exec name
string funcname = 2; //call function name string funcname = 2; // call function name
string args = 3; //json args string args = 3; // json args
} }
message JsAction { message JsAction {
......
...@@ -25,7 +25,7 @@ message Lottery { ...@@ -25,7 +25,7 @@ message Lottery {
int64 drawBlockNum = 6; int64 drawBlockNum = 6;
int64 lastTransToPurState = 7; int64 lastTransToPurState = 7;
int64 lastTransToDrawState = 8; int64 lastTransToDrawState = 8;
//map<string, PurchaseRecords> records = 9; // map<string, PurchaseRecords> records = 9;
int64 totalPurchasedTxNum = 10; int64 totalPurchasedTxNum = 10;
string createAddr = 11; string createAddr = 11;
int64 round = 12; int64 round = 12;
...@@ -218,17 +218,17 @@ message ReplyLotteryPurchaseAddr { ...@@ -218,17 +218,17 @@ message ReplyLotteryPurchaseAddr {
repeated string address = 1; repeated string address = 1;
} }
message LotteryGainInfos{ message LotteryGainInfos {
repeated LotteryGainInfo gains = 1; repeated LotteryGainInfo gains = 1;
} }
message LotteryGainInfo{ message LotteryGainInfo {
string addr = 1; string addr = 1;
int64 buyAmount = 2; int64 buyAmount = 2;
int64 fundAmount = 3; int64 fundAmount = 3;
} }
message LotteryGainRecord{ message LotteryGainRecord {
string addr = 1; string addr = 1;
int64 buyAmount = 2; int64 buyAmount = 2;
int64 fundAmount = 3; int64 fundAmount = 3;
...@@ -252,4 +252,3 @@ message ReqLotteryGainInfo { ...@@ -252,4 +252,3 @@ message ReqLotteryGainInfo {
string addr = 2; string addr = 2;
int64 round = 3; int64 round = 3;
} }
...@@ -6,12 +6,12 @@ package types; ...@@ -6,12 +6,12 @@ package types;
// message for multisig start///////////////////////////////////////////////////// // message for multisig start/////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//多重签名账户的状态信息,存在在statedb中,通过多重签名账户作为key值 //多重签名账户的状态信息,存在在statedb中,通过多重签名账户作为key值
//createaddr: 创建多重签名地址的创建者账户 // createaddr: 创建多重签名地址的创建者账户
//multisigaddr: 多重签名地址 // multisigaddr: 多重签名地址
//owners: 可以操作此多重签名地址的owner账户列表 // owners: 可以操作此多重签名地址的owner账户列表
//DailyLimit: 不同资产的每日限额,通过symbol来区分,本连的原生币,以及跨链过来的其他链的原生币 // DailyLimit: 不同资产的每日限额,通过symbol来区分,本连的原生币,以及跨链过来的其他链的原生币
//txCount:记录此多重签名地址上提交的withdraw交易数 // txCount:记录此多重签名地址上提交的withdraw交易数
//requiredweight:确认一笔withdraw交易需要的权重。 // requiredweight:确认一笔withdraw交易需要的权重。
message MultiSig { message MultiSig {
string createAddr = 1; string createAddr = 1;
string multiSigAddr = 2; string multiSigAddr = 2;
...@@ -27,7 +27,7 @@ message ConfirmedOwner { ...@@ -27,7 +27,7 @@ message ConfirmedOwner {
} }
//记录提交的交易详情,在满足确认条件后执行data中的交易 //记录提交的交易详情,在满足确认条件后执行data中的交易
//txHash:用于存贮提交的确认交易。存贮在localdb中,通过txhash可以获取 // txHash:用于存贮提交的确认交易。存贮在localdb中,通过txhash可以获取
message MultiSigTx { message MultiSigTx {
uint64 txid = 1; uint64 txid = 1;
string txHash = 2; string txHash = 2;
...@@ -35,51 +35,49 @@ message MultiSigTx { ...@@ -35,51 +35,49 @@ message MultiSigTx {
uint64 txType = 4; uint64 txType = 4;
string multiSigAddr = 5; string multiSigAddr = 5;
repeated Owner confirmedOwner = 6; repeated Owner confirmedOwner = 6;
} }
// owner 结构体:owner账户地址,以及权重 // owner 结构体:owner账户地址,以及权重
message Owner { message Owner {
string ownerAddr =1; string ownerAddr = 1;
uint64 weight=2; uint64 weight = 2;
} }
// 资产symbol的定义,可能存在不同的平行链上发布相同名字的token, // 资产symbol的定义,可能存在不同的平行链上发布相同名字的token,
//或者在主链发布一个token:HYB 而在guodun的平行链上也会发布一个token:HYB //或者在主链发布一个token:HYB 而在guodun的平行链上也会发布一个token:HYB
// coins.bty和coins.guodun // coins.bty和coins.guodun
//1:原始数据 // 1:原始数据
//主链上:原始币symbol:BTY,token.symbol(例如:TEST) //主链上:原始币symbol:BTY,token.symbol(例如:TEST)
//guodun平行链上的原始币symbol:guodun,token.symbol(例如:TEST) // guodun平行链上的原始币symbol:guodun,token.symbol(例如:TEST)
//2:主链原始币转移到平行链上: // 2:主链原始币转移到平行链上:
//guodun平行链上的现有原始币symbol:guodun,token.symbol(例如:TEST) // guodun平行链上的现有原始币symbol:guodun,token.symbol(例如:TEST)
//以及主链转移过来的symbol: coins.BTY和token.TEST (主链转移过来的资产在平行链上的symbol) //以及主链转移过来的symbol: coins.BTY和token.TEST (主链转移过来的资产在平行链上的symbol)
//每日资产限额,不同的资产价格不一致,需要设置各自的每日限额。没有设置或者限额是0时,表示不能取币 //每日资产限额,不同的资产价格不一致,需要设置各自的每日限额。没有设置或者限额是0时,表示不能取币
//spentToday今天已经花费的额度。用于和dailyLimit做对比,超过每日限额时需要多重签名 // spentToday今天已经花费的额度。用于和dailyLimit做对比,超过每日限额时需要多重签名
//lastDay记录当天开始的时间戳,新的一天需要重置spentToday为初始值0,并修改lastDay的时间戳 // lastDay记录当天开始的时间戳,新的一天需要重置spentToday为初始值0,并修改lastDay的时间戳
message DailyLimit { message DailyLimit {
string symbol =1; string symbol = 1;
string execer =2; string execer = 2;
uint64 dailyLimit =3; uint64 dailyLimit = 3;
uint64 spentToday =4; uint64 spentToday = 4;
int64 lastDay =5; int64 lastDay = 5;
} }
message SymbolDailyLimit { message SymbolDailyLimit {
string symbol =1; string symbol = 1;
string execer =2; string execer = 2;
uint64 dailyLimit =3; uint64 dailyLimit = 3;
} }
//MultiSig 所有可能的交易action // MultiSig 所有可能的交易action
message MultiSigAction { message MultiSigAction {
oneof value { oneof value {
MultiSigAccCreate multiSigAccCreate = 1; MultiSigAccCreate multiSigAccCreate = 1;
MultiSigOwnerOperate multiSigOwnerOperate = 2; MultiSigOwnerOperate multiSigOwnerOperate = 2;
MultiSigAccOperate multiSigAccOperate = 3; MultiSigAccOperate multiSigAccOperate = 3;
MultiSigConfirmTx multiSigConfirmTx = 4;//确认或者撤销已确认 MultiSigConfirmTx multiSigConfirmTx = 4; //确认或者撤销已确认
MultiSigExecTransferTo multiSigExecTransferTo = 5;//合约中外部账户转账到多重签名账户,Addr --->multiSigAddr MultiSigExecTransferTo multiSigExecTransferTo = 5; //合约中外部账户转账到多重签名账户,Addr --->multiSigAddr
MultiSigExecTransferFrom multiSigExecTransferFrom = 6;//合约中多重签名账户转账到外部账户,multiSigAddr--->Addr MultiSigExecTransferFrom multiSigExecTransferFrom = 6; //合约中多重签名账户转账到外部账户,multiSigAddr--->Addr
} }
int32 Ty = 7; int32 Ty = 7;
} }
...@@ -132,17 +130,15 @@ message MultiSigExecTransferTo { ...@@ -132,17 +130,15 @@ message MultiSigExecTransferTo {
} }
//多重签名账户withdraw交易的确认或者取消确认 //多重签名账户withdraw交易的确认或者取消确认
//multisigaccaddr:多重签名账户地址 // multisigaccaddr:多重签名账户地址
//transactionid:多重签名账户上的withdraw交易的内部id // transactionid:多重签名账户上的withdraw交易的内部id
message MultiSigConfirmTx { message MultiSigConfirmTx {
string multiSigAccAddr = 1; string multiSigAccAddr = 1;
uint64 txId = 2; uint64 txId = 2;
bool confirmOrRevoke = 3; bool confirmOrRevoke = 3;
} }
// query的接口:
//query的接口:
//第一步:获取所有多重签名账号 //第一步:获取所有多重签名账号
//第二步:获取指定多重签名账号的状态信息:包含创建者,owners,weight权重,以及各个资产的每日限量 //第二步:获取指定多重签名账号的状态信息:包含创建者,owners,weight权重,以及各个资产的每日限量
//第三步:获取指定多重签名账户下的peding或者executed的交易id //第三步:获取指定多重签名账户下的peding或者executed的交易id
...@@ -187,7 +183,6 @@ message ReplyMultiSigTxids { ...@@ -187,7 +183,6 @@ message ReplyMultiSigTxids {
repeated uint64 txids = 2; repeated uint64 txids = 2;
} }
//获取txid交易的信息,以及参与确认的owner信息 //获取txid交易的信息,以及参与确认的owner信息
message ReqMultiSigTxInfo { message ReqMultiSigTxInfo {
string multiSigAddr = 1; string multiSigAddr = 1;
...@@ -216,14 +211,14 @@ message UnSpentAssets { ...@@ -216,14 +211,14 @@ message UnSpentAssets {
//交易执行结果的Receipt信息: //交易执行结果的Receipt信息:
//TyLogMultiSigAccCreate交易的执行Receipt // TyLogMultiSigAccCreate交易的执行Receipt
message ReceiptMultiSig { message ReceiptMultiSig {
string multiSigAddr = 1; string multiSigAddr = 1;
} }
//owner的操作: // owner的操作:
//TyLogMultiSigOwnerAdd = 10001 //输出add的owner:addr和weight // TyLogMultiSigOwnerAdd = 10001 //输出add的owner:addr和weight
//TyLogMultiSigOwnerDel = 10002 //输出del的owner:addr和weight // TyLogMultiSigOwnerDel = 10002 //输出del的owner:addr和weight
message ReceiptOwnerAddOrDel { message ReceiptOwnerAddOrDel {
string multiSigAddr = 1; string multiSigAddr = 1;
...@@ -231,8 +226,8 @@ message ReceiptOwnerAddOrDel { ...@@ -231,8 +226,8 @@ message ReceiptOwnerAddOrDel {
bool addOrDel = 3; bool addOrDel = 3;
} }
//TyLogMultiSigOwnerModify = 10003 //输出modify的owner:preweight以及currentweight // TyLogMultiSigOwnerModify = 10003 //输出modify的owner:preweight以及currentweight
//TyLogMultiSigOwnerReplace = 10004 //输出old的owner的信息:以及当前的owner信息:addr+weight // TyLogMultiSigOwnerReplace = 10004 //输出old的owner的信息:以及当前的owner信息:addr+weight
message ReceiptOwnerModOrRep { message ReceiptOwnerModOrRep {
string multiSigAddr = 1; string multiSigAddr = 1;
Owner prevOwner = 2; Owner prevOwner = 2;
...@@ -241,14 +236,14 @@ message ReceiptOwnerModOrRep { ...@@ -241,14 +236,14 @@ message ReceiptOwnerModOrRep {
} }
//多重签名账户的操作:ReqWeight,AssetDailyLimit //多重签名账户的操作:ReqWeight,AssetDailyLimit
//TyLogMultiSigAccWeightModify = 10005 //输出修改前后确认权重的值:preReqWeight和curReqWeight // TyLogMultiSigAccWeightModify = 10005 //输出修改前后确认权重的值:preReqWeight和curReqWeight
message ReceiptWeightModify { message ReceiptWeightModify {
string multiSigAddr = 1; string multiSigAddr = 1;
uint64 prevWeight = 2; uint64 prevWeight = 2;
uint64 currentWeight = 3; uint64 currentWeight = 3;
} }
//TyLogMultiSigAccDailyLimitAdd = 10006 //输出add的DailyLimit:Symbol和DailyLimit // TyLogMultiSigAccDailyLimitAdd = 10006 //输出add的DailyLimit:Symbol和DailyLimit
//TyLogMultiSigAccDailyLimitModify = 10007 //输出modify的DailyLimit:preDailyLimit以及currentDailyLimit // TyLogMultiSigAccDailyLimitModify = 10007 //输出modify的DailyLimit:preDailyLimit以及currentDailyLimit
message ReceiptDailyLimitOperate { message ReceiptDailyLimitOperate {
string multiSigAddr = 1; string multiSigAddr = 1;
DailyLimit prevDailyLimit = 2; DailyLimit prevDailyLimit = 2;
...@@ -257,8 +252,8 @@ message ReceiptDailyLimitOperate { ...@@ -257,8 +252,8 @@ message ReceiptDailyLimitOperate {
} }
//交易确认或者撤销(撤销值针对未执行的交易) //交易确认或者撤销(撤销值针对未执行的交易)
//TyLogMultiSigConfirmTx = 10008 //输出确认的交易id,以及owner信息:addr+weight // TyLogMultiSigConfirmTx = 10008 //输出确认的交易id,以及owner信息:addr+weight
//TyLogMultiSigConfirmTxRevoke = 10009 //输出撤销确认的交易id,以及owner信息:addr+weight // TyLogMultiSigConfirmTxRevoke = 10009 //输出撤销确认的交易id,以及owner信息:addr+weight
message ReceiptConfirmTx { message ReceiptConfirmTx {
MultiSigTxOwner multiSigTxOwner = 1; MultiSigTxOwner multiSigTxOwner = 1;
bool confirmeOrRevoke = 2; bool confirmeOrRevoke = 2;
...@@ -277,7 +272,6 @@ message ReceiptMultiSigTx { ...@@ -277,7 +272,6 @@ message ReceiptMultiSigTx {
bool submitOrConfirm = 4; bool submitOrConfirm = 4;
string txHash = 5; string txHash = 5;
uint64 txType = 6; uint64 txType = 6;
} }
message ReceiptTxCountUpdate { message ReceiptTxCountUpdate {
...@@ -292,15 +286,14 @@ message MultiSigTxOwner { ...@@ -292,15 +286,14 @@ message MultiSigTxOwner {
} }
//具体转币的处理; //具体转币的处理;
//TyLogMultiSigExecTransfer = 10010 // TyLogMultiSigExecTransfer = 10010
//入币:将from地址在MultiSig合约中的币转移到指定的多重签名账户ExecTransfer中,并将其冻结ExecFrozen //入币:将from地址在MultiSig合约中的币转移到指定的多重签名账户ExecTransfer中,并将其冻结ExecFrozen
//注释:使用chain33/types中定义的ReceiptExecAccountTransfer即可 //注释:使用chain33/types中定义的ReceiptExecAccountTransfer即可
//TyLogMultiSigWithdraw = 10011 // TyLogMultiSigWithdraw = 10011
//出币:将多重签名地址上冻结的币转给MultiSig合约中TO地址上ExecTransferFrozen //出币:将多重签名地址上冻结的币转给MultiSig合约中TO地址上ExecTransferFrozen
//注释:使用chain33/types中定义的ReceiptExecAccountTransfer即可 //注释:使用chain33/types中定义的ReceiptExecAccountTransfer即可
message Uint64 { message Uint64 {
uint64 data = 1; uint64 data = 1;
} }
...@@ -340,7 +333,7 @@ message AccAddress { ...@@ -340,7 +333,7 @@ message AccAddress {
repeated string address = 1; repeated string address = 1;
} }
//owner拥有的多重签名账户信息 // owner拥有的多重签名账户信息
message OwnerAttr { message OwnerAttr {
string multiSigAddr = 1; string multiSigAddr = 1;
string ownerAddr = 2; string ownerAddr = 2;
......
...@@ -14,7 +14,7 @@ message OracleStatus { ...@@ -14,7 +14,7 @@ message OracleStatus {
EventStatus status = 8; //操作状态 EventStatus status = 8; //操作状态
string source = 9; //数据来源 string source = 9; //数据来源
string result = 10; //事件结果 string result = 10; //事件结果
EventStatus preStatus=11; //上次操作后状态及操作者地址 EventStatus preStatus = 11; //上次操作后状态及操作者地址
} }
// action // action
...@@ -87,7 +87,7 @@ message ReceiptOracle { ...@@ -87,7 +87,7 @@ message ReceiptOracle {
int32 status = 2; //事件状态 int32 status = 2; //事件状态
string addr = 3; //事件发布者的地址 string addr = 3; //事件发布者的地址
string type = 4; //事件类型 string type = 4; //事件类型
int32 preStatus = 6;//事件的前一个状态 int32 preStatus = 6; //事件的前一个状态
} }
message ReplyOracleStatusList { message ReplyOracleStatusList {
......
...@@ -16,8 +16,6 @@ message ParacrossStatusDetails { ...@@ -16,8 +16,6 @@ message ParacrossStatusDetails {
message ParacrossStatusBlockDetails { message ParacrossStatusBlockDetails {
repeated bytes blockHashs = 1; repeated bytes blockHashs = 1;
repeated bytes txResults = 2; repeated bytes txResults = 2;
} }
message ParacrossHeightStatus { message ParacrossHeightStatus {
...@@ -39,7 +37,6 @@ message ParacrossHeightStatusRsp { ...@@ -39,7 +37,6 @@ message ParacrossHeightStatusRsp {
string mainHash = 5; string mainHash = 5;
repeated string commitAddrs = 6; repeated string commitAddrs = 6;
repeated string commitBlockHash = 7; repeated string commitBlockHash = 7;
} }
message ParacrossStatus { message ParacrossStatus {
...@@ -64,7 +61,6 @@ message ParaNodeAddrConfig { ...@@ -64,7 +61,6 @@ message ParaNodeAddrConfig {
string addr = 4; string addr = 4;
uint32 value = 5; uint32 value = 5;
int64 coinsFrozen = 6; int64 coinsFrozen = 6;
} }
message ParaNodeVoteDetail { message ParaNodeVoteDetail {
...@@ -91,7 +87,6 @@ message ParaNodeIdStatus { ...@@ -91,7 +87,6 @@ message ParaNodeIdStatus {
int64 height = 8; int64 height = 8;
} }
message ReceiptParaNodeConfig { message ReceiptParaNodeConfig {
string addr = 1; string addr = 1;
ParaNodeAddrConfig config = 2; ParaNodeAddrConfig config = 2;
...@@ -114,7 +109,6 @@ message ReceiptParaNodeVoteDone { ...@@ -114,7 +109,6 @@ message ReceiptParaNodeVoteDone {
int32 mostVote = 6; int32 mostVote = 6;
string voteRst = 7; string voteRst = 7;
int32 doneStatus = 8; int32 doneStatus = 8;
} }
message ParaNodeGroupConfig { message ParaNodeGroupConfig {
...@@ -125,7 +119,6 @@ message ParaNodeGroupConfig { ...@@ -125,7 +119,6 @@ message ParaNodeGroupConfig {
int64 coinsFrozen = 5; int64 coinsFrozen = 5;
} }
message ParaNodeGroupStatus { message ParaNodeGroupStatus {
string id = 1; string id = 1;
int32 status = 2; int32 status = 2;
...@@ -143,14 +136,12 @@ message ReceiptParaNodeGroupConfig { ...@@ -143,14 +136,12 @@ message ReceiptParaNodeGroupConfig {
ParaNodeGroupStatus current = 4; ParaNodeGroupStatus current = 4;
} }
// node query // node query
message ReqParacrossNodeInfo { message ReqParacrossNodeInfo {
string title = 1; string title = 1;
string id = 2; string id = 2;
string addr = 3; string addr = 3;
int32 status = 4; int32 status = 4;
} }
message RespParacrossNodeAddrs { message RespParacrossNodeAddrs {
...@@ -194,7 +185,6 @@ message SelfConsensStages { ...@@ -194,7 +185,6 @@ message SelfConsensStages {
repeated SelfConsensStage items = 1; repeated SelfConsensStage items = 1;
} }
message SelfConsensStage { message SelfConsensStage {
int64 startHeight = 1; int64 startHeight = 1;
uint32 enable = 2; uint32 enable = 2;
...@@ -214,9 +204,6 @@ message LocalSelfConsStageInfo { ...@@ -214,9 +204,6 @@ message LocalSelfConsStageInfo {
string txIndex = 2; string txIndex = 2;
} }
message ConfigVoteInfo { message ConfigVoteInfo {
string id = 1; string id = 1;
// 投票值 1:ok 2:nok // 投票值 1:ok 2:nok
...@@ -235,8 +222,7 @@ message ParaStageConfig { ...@@ -235,8 +222,7 @@ message ParaStageConfig {
oneof value { oneof value {
SelfConsensStage stage = 10; SelfConsensStage stage = 10;
ConfigVoteInfo vote = 11; ConfigVoteInfo vote = 11;
ConfigCancelInfo cancel= 12; ConfigCancelInfo cancel = 12;
} }
} }
...@@ -254,7 +240,7 @@ message ReceiptSelfConsStageVoteDone { ...@@ -254,7 +240,7 @@ message ReceiptSelfConsStageVoteDone {
string voteRst = 6; string voteRst = 6;
} }
message ReceiptSelfConsStagesUpdate{ message ReceiptSelfConsStagesUpdate {
SelfConsensStages prev = 1; SelfConsensStages prev = 1;
SelfConsensStages current = 2; SelfConsensStages current = 2;
} }
...@@ -273,7 +259,6 @@ message ReplyQuerySelfStages { ...@@ -273,7 +259,6 @@ message ReplyQuerySelfStages {
repeated SelfConsensStageInfo stageInfo = 1; repeated SelfConsensStageInfo stageInfo = 1;
} }
message ParacrossCommitAction { message ParacrossCommitAction {
ParacrossNodeStatus status = 1; ParacrossNodeStatus status = 1;
} }
...@@ -295,8 +280,6 @@ message ParacrossAction { ...@@ -295,8 +280,6 @@ message ParacrossAction {
ParaNodeAddrConfig nodeConfig = 9; ParaNodeAddrConfig nodeConfig = 9;
ParaNodeGroupConfig nodeGroupConfig = 10; ParaNodeGroupConfig nodeGroupConfig = 10;
ParaStageConfig selfStageConfig = 11; ParaStageConfig selfStageConfig = 11;
} }
int32 ty = 2; int32 ty = 2;
} }
...@@ -357,8 +340,8 @@ message RespParacrossDone { ...@@ -357,8 +340,8 @@ message RespParacrossDone {
string stateHash = 6; string stateHash = 6;
uint32 txCounts = 7; uint32 txCounts = 7;
string txResult = 8; string txResult = 8;
//commitDone chainHeight // commitDone chainHeight
int64 chainExecHeight= 9; int64 chainExecHeight = 9;
} }
message RespParacrossTitles { message RespParacrossTitles {
......
...@@ -37,7 +37,7 @@ message PBPlayer { ...@@ -37,7 +37,7 @@ message PBPlayer {
repeated PBHand hands = 1; //历史发牌和斗牛结果 repeated PBHand hands = 1; //历史发牌和斗牛结果
string address = 2; //玩家地址 string address = 2; //玩家地址
int64 txHash = 3; //发牌随机数因子txhash的整数格式 int64 txHash = 3; //发牌随机数因子txhash的整数格式
bool ready = 4; //continue状态下,是否ready bool ready = 4; // continue状态下,是否ready
} }
//本局游戏结果 //本局游戏结果
...@@ -193,4 +193,3 @@ message PBQueryReq { ...@@ -193,4 +193,3 @@ message PBQueryReq {
string gameId = 1; string gameId = 1;
int64 fee = 2; int64 fee = 2;
} }
...@@ -356,12 +356,16 @@ func showAmountsOfUTXOCmd() *cobra.Command { ...@@ -356,12 +356,16 @@ func showAmountsOfUTXOCmd() *cobra.Command {
} }
func showAmountOfUTXOFlag(cmd *cobra.Command) { func showAmountOfUTXOFlag(cmd *cobra.Command) {
cmd.Flags().StringP("symbol", "s", "BTY", "asset symbol, default BTY")
cmd.Flags().StringP("exec", "e", "coins", "asset executor(coins, token, paracross), default coins")
} }
func showAmountOfUTXO(cmd *cobra.Command, args []string) { func showAmountOfUTXO(cmd *cobra.Command, args []string) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr") rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
exec, _ := cmd.Flags().GetString("exec")
reqPrivacyToken := pty.ReqPrivacyToken{Token: types.BTY} symbol, _ := cmd.Flags().GetString("symbol")
reqPrivacyToken := pty.ReqPrivacyToken{AssetExec: exec, AssetSymbol: symbol}
var params rpctypes.Query4Jrpc var params rpctypes.Query4Jrpc
params.Execer = pty.PrivacyX params.Execer = pty.PrivacyX
params.FuncName = "ShowAmountsOfUTXO" params.FuncName = "ShowAmountsOfUTXO"
...@@ -394,15 +398,19 @@ func showUTXOs4SpecifiedAmountCmd() *cobra.Command { ...@@ -394,15 +398,19 @@ func showUTXOs4SpecifiedAmountCmd() *cobra.Command {
func showUTXOs4SpecifiedAmountFlag(cmd *cobra.Command) { func showUTXOs4SpecifiedAmountFlag(cmd *cobra.Command) {
cmd.Flags().Float64P("amount", "a", 0, "amount") cmd.Flags().Float64P("amount", "a", 0, "amount")
cmd.MarkFlagRequired("amount") cmd.MarkFlagRequired("amount")
cmd.Flags().StringP("exec", "e", "coins", "asset executor(coins, token, paracross), default coins")
cmd.Flags().StringP("symbol", "s", "BTY", "asset symbol, default BTY")
} }
func showUTXOs4SpecifiedAmount(cmd *cobra.Command, args []string) { func showUTXOs4SpecifiedAmount(cmd *cobra.Command, args []string) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr") rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
amount, _ := cmd.Flags().GetFloat64("amount") amount, _ := cmd.Flags().GetFloat64("amount")
amountInt64 := int64(amount*types.InputPrecision) * types.Multiple1E4 amountInt64 := int64(amount*types.InputPrecision) * types.Multiple1E4
exec, _ := cmd.Flags().GetString("exec")
symbol, _ := cmd.Flags().GetString("symbol")
reqPrivacyToken := pty.ReqPrivacyToken{ reqPrivacyToken := pty.ReqPrivacyToken{
Token: types.BTY, AssetExec: exec,
AssetSymbol: symbol,
Amount: amountInt64, Amount: amountInt64,
} }
var params rpctypes.Query4Jrpc var params rpctypes.Query4Jrpc
......
...@@ -44,11 +44,8 @@ func (p *privacy) Exec_Public2Privacy(payload *ty.Public2Privacy, tx *types.Tran ...@@ -44,11 +44,8 @@ func (p *privacy) Exec_Public2Privacy(payload *ty.Public2Privacy, tx *types.Tran
receipt.KV = append(receipt.KV, &types.KeyValue{Key: key, Value: value}) receipt.KV = append(receipt.KV, &types.KeyValue{Key: key, Value: value})
} }
receiptPrivacyOutput := &ty.ReceiptPrivacyOutput{ receiptLogs := p.buildPrivacyReceiptLog(payload.GetAssetExec(), payload.GetTokenname(), payload.GetOutput().GetKeyoutput())
Token: payload.Tokenname, execlog := &types.ReceiptLog{Ty: ty.TyLogPrivacyOutput, Log: types.Encode(receiptLogs)}
Keyoutput: payload.GetOutput().Keyoutput,
}
execlog := &types.ReceiptLog{Ty: ty.TyLogPrivacyOutput, Log: types.Encode(receiptPrivacyOutput)}
receipt.Logs = append(receipt.Logs, execlog) receipt.Logs = append(receipt.Logs, execlog)
//////////////////debug code begin/////////////// //////////////////debug code begin///////////////
...@@ -82,12 +79,8 @@ func (p *privacy) Exec_Privacy2Privacy(payload *ty.Privacy2Privacy, tx *types.Tr ...@@ -82,12 +79,8 @@ func (p *privacy) Exec_Privacy2Privacy(payload *ty.Privacy2Privacy, tx *types.Tr
value := types.Encode(keyOutput) value := types.Encode(keyOutput)
receipt.KV = append(receipt.KV, &types.KeyValue{Key: key, Value: value}) receipt.KV = append(receipt.KV, &types.KeyValue{Key: key, Value: value})
} }
receiptLogs := p.buildPrivacyReceiptLog(payload.GetAssetExec(), payload.GetTokenname(), payload.GetOutput().GetKeyoutput())
receiptPrivacyOutput := &ty.ReceiptPrivacyOutput{ execlog = &types.ReceiptLog{Ty: ty.TyLogPrivacyOutput, Log: types.Encode(receiptLogs)}
Token: payload.Tokenname,
Keyoutput: payload.GetOutput().Keyoutput,
}
execlog = &types.ReceiptLog{Ty: ty.TyLogPrivacyOutput, Log: types.Encode(receiptPrivacyOutput)}
receipt.Logs = append(receipt.Logs, execlog) receipt.Logs = append(receipt.Logs, execlog)
receipt.Ty = types.ExecOk receipt.Ty = types.ExecOk
...@@ -132,11 +125,8 @@ func (p *privacy) Exec_Privacy2Public(payload *ty.Privacy2Public, tx *types.Tran ...@@ -132,11 +125,8 @@ func (p *privacy) Exec_Privacy2Public(payload *ty.Privacy2Public, tx *types.Tran
receipt.KV = append(receipt.KV, &types.KeyValue{Key: key, Value: value}) receipt.KV = append(receipt.KV, &types.KeyValue{Key: key, Value: value})
} }
receiptPrivacyOutput := &ty.ReceiptPrivacyOutput{ receiptLog := p.buildPrivacyReceiptLog(payload.GetAssetExec(), payload.GetTokenname(), payload.GetOutput().GetKeyoutput())
Token: payload.Tokenname, execlog = &types.ReceiptLog{Ty: ty.TyLogPrivacyOutput, Log: types.Encode(receiptLog)}
Keyoutput: payload.GetOutput().Keyoutput,
}
execlog = &types.ReceiptLog{Ty: ty.TyLogPrivacyOutput, Log: types.Encode(receiptPrivacyOutput)}
receipt.Logs = append(receipt.Logs, execlog) receipt.Logs = append(receipt.Logs, execlog)
receipt.Ty = types.ExecOk receipt.Ty = types.ExecOk
...@@ -155,3 +145,16 @@ func (p *privacy) createAccountDB(exec, symbol string) (*account.DB, error) { ...@@ -155,3 +145,16 @@ func (p *privacy) createAccountDB(exec, symbol string) (*account.DB, error) {
cfg := p.GetAPI().GetConfig() cfg := p.GetAPI().GetConfig()
return account.NewAccountDB(cfg, exec, symbol, p.GetStateDB()) return account.NewAccountDB(cfg, exec, symbol, p.GetStateDB())
} }
func (p *privacy) buildPrivacyReceiptLog(assetExec, assetSymbol string, output []*ty.KeyOutput) *ty.ReceiptPrivacyOutput {
if assetExec == "" {
assetExec = "coins"
}
receipt := &ty.ReceiptPrivacyOutput{
AssetExec: assetExec,
AssetSymbol: assetSymbol,
Keyoutput: output,
}
return receipt
}
...@@ -26,19 +26,19 @@ func (p *privacy) execDelLocal(tx *types.Transaction, receiptData *types.Receipt ...@@ -26,19 +26,19 @@ func (p *privacy) execDelLocal(tx *types.Transaction, receiptData *types.Receipt
privacylog.Error("PrivacyTrading ExecDelLocal", "txhash", txhashstr, "Decode item.Log error ", err) privacylog.Error("PrivacyTrading ExecDelLocal", "txhash", txhashstr, "Decode item.Log error ", err)
panic(err) panic(err)
} }
assetExec := receiptPrivacyOutput.GetAssetExec()
token := receiptPrivacyOutput.Token assetSymbol := receiptPrivacyOutput.GetAssetSymbol()
txhashInByte := tx.Hash() txhashInByte := tx.Hash()
txhash := common.ToHex(txhashInByte) txhash := common.ToHex(txhashInByte)
for m, keyOutput := range receiptPrivacyOutput.Keyoutput { for m, keyOutput := range receiptPrivacyOutput.Keyoutput {
//kv1,添加一个具体的UTXO,方便我们可以查询相应token下特定额度下,不同高度时,不同txhash的UTXO //kv1,添加一个具体的UTXO,方便我们可以查询相应token下特定额度下,不同高度时,不同txhash的UTXO
key := CalcPrivacyUTXOkeyHeight(token, keyOutput.Amount, p.GetHeight(), txhash, i, m) key := CalcPrivacyUTXOkeyHeight(assetExec, assetSymbol, keyOutput.Amount, p.GetHeight(), txhash, i, m)
kv := &types.KeyValue{Key: key, Value: nil} kv := &types.KeyValue{Key: key, Value: nil}
dbSet.KV = append(dbSet.KV, kv) dbSet.KV = append(dbSet.KV, kv)
//kv2,添加各种不同额度的kv记录,能让我们很方便的获知本系统存在的所有不同的额度的UTXO //kv2,添加各种不同额度的kv记录,能让我们很方便的获知本系统存在的所有不同的额度的UTXO
var amountTypes ty.AmountsOfUTXO var amountTypes ty.AmountsOfUTXO
key2 := CalcprivacyKeyTokenAmountType(token) key2 := CalcprivacyKeyTokenAmountType(assetExec, assetSymbol)
value2, err := localDB.Get(key2) value2, err := localDB.Get(key2)
//如果该种token不是第一次进行隐私操作 //如果该种token不是第一次进行隐私操作
if err == nil && value2 != nil { if err == nil && value2 != nil {
...@@ -63,15 +63,16 @@ func (p *privacy) execDelLocal(tx *types.Transaction, receiptData *types.Receipt ...@@ -63,15 +63,16 @@ func (p *privacy) execDelLocal(tx *types.Transaction, receiptData *types.Receipt
} }
//kv3,添加存在隐私交易token的类型 //kv3,添加存在隐私交易token的类型
assetKey := calcExecLocalAssetKey(assetExec, assetSymbol)
var tokenNames ty.TokenNamesOfUTXO var tokenNames ty.TokenNamesOfUTXO
key3 := CalcprivacyKeyTokenTypes() key3 := CalcprivacyKeyTokenTypes()
value3, err := localDB.Get(key3) value3, err := localDB.Get(key3)
if err == nil && value3 != nil { if err == nil && value3 != nil {
err := types.Decode(value3, &tokenNames) err := types.Decode(value3, &tokenNames)
if err == nil { if err == nil {
if settxhash, ok := tokenNames.TokensMap[token]; ok { if settxhash, ok := tokenNames.TokensMap[assetKey]; ok {
if settxhash == txhash { if settxhash == txhash {
delete(tokenNames.TokensMap, token) delete(tokenNames.TokensMap, assetKey)
value3 := types.Encode(&tokenNames) value3 := types.Encode(&tokenNames)
kv := &types.KeyValue{Key: key3, Value: value3} kv := &types.KeyValue{Key: key3, Value: value3}
dbSet.KV = append(dbSet.KV, kv) dbSet.KV = append(dbSet.KV, kv)
......
...@@ -27,12 +27,13 @@ func (p *privacy) execLocal(receiptData *types.ReceiptData, tx *types.Transactio ...@@ -27,12 +27,13 @@ func (p *privacy) execLocal(receiptData *types.ReceiptData, tx *types.Transactio
panic(err) //数据错误了,已经被修改了 panic(err) //数据错误了,已经被修改了
} }
token := receiptPrivacyOutput.Token assetExec := receiptPrivacyOutput.GetAssetExec()
assetSymbol := receiptPrivacyOutput.GetAssetSymbol()
txhashInByte := tx.Hash() txhashInByte := tx.Hash()
txhash := common.ToHex(txhashInByte) txhash := common.ToHex(txhashInByte)
for outputIndex, keyOutput := range receiptPrivacyOutput.Keyoutput { for outputIndex, keyOutput := range receiptPrivacyOutput.Keyoutput {
//kv1,添加一个具体的UTXO,方便我们可以查询相应token下特定额度下,不同高度时,不同txhash的UTXO //kv1,添加一个具体的UTXO,方便我们可以查询相应token下特定额度下,不同高度时,不同txhash的UTXO
key := CalcPrivacyUTXOkeyHeight(token, keyOutput.Amount, p.GetHeight(), txhash, index, outputIndex) key := CalcPrivacyUTXOkeyHeight(assetExec, assetSymbol, keyOutput.Amount, p.GetHeight(), txhash, index, outputIndex)
localUTXOItem := &ty.LocalUTXOItem{ localUTXOItem := &ty.LocalUTXOItem{
Height: p.GetHeight(), Height: p.GetHeight(),
Txindex: int32(index), Txindex: int32(index),
...@@ -46,7 +47,7 @@ func (p *privacy) execLocal(receiptData *types.ReceiptData, tx *types.Transactio ...@@ -46,7 +47,7 @@ func (p *privacy) execLocal(receiptData *types.ReceiptData, tx *types.Transactio
//kv2,添加各种不同额度的kv记录,能让我们很方便的获知本系统存在的所有不同的额度的UTXO //kv2,添加各种不同额度的kv记录,能让我们很方便的获知本系统存在的所有不同的额度的UTXO
var amountTypes ty.AmountsOfUTXO var amountTypes ty.AmountsOfUTXO
key2 := CalcprivacyKeyTokenAmountType(token) key2 := CalcprivacyKeyTokenAmountType(assetExec, assetSymbol)
value2, err := localDB.Get(key2) value2, err := localDB.Get(key2)
//如果该种token不是第一次进行隐私操作 //如果该种token不是第一次进行隐私操作
if err == nil && value2 != nil { if err == nil && value2 != nil {
...@@ -78,14 +79,15 @@ func (p *privacy) execLocal(receiptData *types.ReceiptData, tx *types.Transactio ...@@ -78,14 +79,15 @@ func (p *privacy) execLocal(receiptData *types.ReceiptData, tx *types.Transactio
} }
//kv3,添加存在隐私交易token的类型 //kv3,添加存在隐私交易token的类型
assetKey := calcExecLocalAssetKey(assetExec, assetSymbol)
var tokenNames ty.TokenNamesOfUTXO var tokenNames ty.TokenNamesOfUTXO
key3 := CalcprivacyKeyTokenTypes() key3 := CalcprivacyKeyTokenTypes()
value3, err := localDB.Get(key3) value3, err := localDB.Get(key3)
if err == nil && len(value3) != 0 { if err == nil && len(value3) != 0 {
err := types.Decode(value3, &tokenNames) err := types.Decode(value3, &tokenNames)
if err == nil { if err == nil {
if _, ok := tokenNames.TokensMap[token]; !ok { if _, ok := tokenNames.TokensMap[assetKey]; !ok {
tokenNames.TokensMap[token] = txhash tokenNames.TokensMap[assetKey] = txhash
kv := &types.KeyValue{Key: key3, Value: types.Encode(&tokenNames)} kv := &types.KeyValue{Key: key3, Value: types.Encode(&tokenNames)}
dbSet.KV = append(dbSet.KV, kv) dbSet.KV = append(dbSet.KV, kv)
localDB.Set(key3, types.Encode(&tokenNames)) localDB.Set(key3, types.Encode(&tokenNames))
...@@ -93,7 +95,7 @@ func (p *privacy) execLocal(receiptData *types.ReceiptData, tx *types.Transactio ...@@ -93,7 +95,7 @@ func (p *privacy) execLocal(receiptData *types.ReceiptData, tx *types.Transactio
} }
} else { } else {
tokenNames.TokensMap = make(map[string]string) tokenNames.TokensMap = make(map[string]string)
tokenNames.TokensMap[token] = txhash tokenNames.TokensMap[assetKey] = txhash
kv := &types.KeyValue{Key: key3, Value: types.Encode(&tokenNames)} kv := &types.KeyValue{Key: key3, Value: types.Encode(&tokenNames)}
dbSet.KV = append(dbSet.KV, kv) dbSet.KV = append(dbSet.KV, kv)
localDB.Set(key3, types.Encode(&tokenNames)) localDB.Set(key3, types.Encode(&tokenNames))
......
...@@ -40,21 +40,25 @@ func calcPrivacyKeyImageKey(exec, token string, keyimage []byte) []byte { ...@@ -40,21 +40,25 @@ func calcPrivacyKeyImageKey(exec, token string, keyimage []byte) []byte {
} }
//CalcPrivacyUTXOkeyHeight 在本地数据库中设置一条可以找到对应amount的对应的utxo的global index //CalcPrivacyUTXOkeyHeight 在本地数据库中设置一条可以找到对应amount的对应的utxo的global index
func CalcPrivacyUTXOkeyHeight(token string, amount, height int64, txhash string, txindex, outindex int) (key []byte) { func CalcPrivacyUTXOkeyHeight(exec, token string, amount, height int64, txhash string, txindex, outindex int) (key []byte) {
return []byte(fmt.Sprintf(privacyUTXOKEYPrefix+"-%s-%d-%d-%s-%d-%d", token, amount, height, txhash, txindex, outindex)) return []byte(fmt.Sprintf(privacyUTXOKEYPrefix+"-%s-%s-%d-%d-%s-%d-%d", exec, token, amount, height, txhash, txindex, outindex))
} }
// CalcPrivacyUTXOkeyHeightPrefix get privacy utxo key by height and prefix // CalcPrivacyUTXOkeyHeightPrefix get privacy utxo key by height and prefix
func CalcPrivacyUTXOkeyHeightPrefix(token string, amount int64) (key []byte) { func CalcPrivacyUTXOkeyHeightPrefix(exec, token string, amount int64) (key []byte) {
return []byte(fmt.Sprintf(privacyUTXOKEYPrefix+"-%s-%d-", token, amount)) return []byte(fmt.Sprintf(privacyUTXOKEYPrefix+"-%s-%s-%d-", exec, token, amount))
} }
//CalcprivacyKeyTokenAmountType 设置当前系统存在的token的amount的类型,如存在1,3,5,100...等等的类型, //CalcprivacyKeyTokenAmountType 设置当前系统存在的token的amount的类型,如存在1,3,5,100...等等的类型,
func CalcprivacyKeyTokenAmountType(token string) (key []byte) { func CalcprivacyKeyTokenAmountType(exec, token string) (key []byte) {
return []byte(fmt.Sprintf(privacyAmountTypePrefix+"-%s-", token)) return []byte(fmt.Sprintf(privacyAmountTypePrefix+"-%s-%s-", exec, token))
} }
// CalcprivacyKeyTokenTypes get privacy token types key // CalcprivacyKeyTokenTypes get privacy token types key
func CalcprivacyKeyTokenTypes() (key []byte) { func CalcprivacyKeyTokenTypes() (key []byte) {
return []byte(privacyTokenTypesPrefix) return []byte(privacyTokenTypesPrefix)
} }
func calcExecLocalAssetKey(exec, symbol string) string {
return exec + "-" + symbol
}
...@@ -72,10 +72,10 @@ func (p *privacy) GetDriverName() string { ...@@ -72,10 +72,10 @@ func (p *privacy) GetDriverName() string {
return driverName return driverName
} }
func (p *privacy) getUtxosByTokenAndAmount(tokenName string, amount int64, count int32) ([]*pty.LocalUTXOItem, error) { func (p *privacy) getUtxosByTokenAndAmount(exec, tokenName string, amount int64, count int32) ([]*pty.LocalUTXOItem, error) {
localDB := p.GetLocalDB() localDB := p.GetLocalDB()
var utxos []*pty.LocalUTXOItem var utxos []*pty.LocalUTXOItem
prefix := CalcPrivacyUTXOkeyHeightPrefix(tokenName, amount) prefix := CalcPrivacyUTXOkeyHeightPrefix(exec, tokenName, amount)
values, err := localDB.List(prefix, nil, count, 0) values, err := localDB.List(prefix, nil, count, 0)
if err != nil { if err != nil {
return utxos, err return utxos, err
...@@ -97,13 +97,12 @@ func (p *privacy) getUtxosByTokenAndAmount(tokenName string, amount int64, count ...@@ -97,13 +97,12 @@ func (p *privacy) getUtxosByTokenAndAmount(tokenName string, amount int64, count
return utxos, nil return utxos, nil
} }
func (p *privacy) getGlobalUtxoIndex(getUtxoIndexReq *pty.ReqUTXOGlobalIndex) (types.Message, error) { func (p *privacy) getGlobalUtxoIndex(req *pty.ReqUTXOGlobalIndex) (types.Message, error) {
debugBeginTime := time.Now() debugBeginTime := time.Now()
utxoGlobalIndexResp := &pty.ResUTXOGlobalIndex{} utxoGlobalIndexResp := &pty.ResUTXOGlobalIndex{}
tokenName := getUtxoIndexReq.Tokenname
currentHeight := p.GetHeight() currentHeight := p.GetHeight()
for _, amount := range getUtxoIndexReq.Amount { for _, amount := range req.GetAmount() {
utxos, err := p.getUtxosByTokenAndAmount(tokenName, amount, pty.UTXOCacheCount) utxos, err := p.getUtxosByTokenAndAmount(req.GetAssetExec(), req.GetAssetSymbol(), amount, pty.UTXOCacheCount)
if err != nil { if err != nil {
return utxoGlobalIndexResp, err return utxoGlobalIndexResp, err
} }
...@@ -115,7 +114,7 @@ func (p *privacy) getGlobalUtxoIndex(getUtxoIndexReq *pty.ReqUTXOGlobalIndex) (t ...@@ -115,7 +114,7 @@ func (p *privacy) getGlobalUtxoIndex(getUtxoIndexReq *pty.ReqUTXOGlobalIndex) (t
} }
} }
mixCount := getUtxoIndexReq.MixCount mixCount := req.GetMixCount()
totalCnt := int32(index + 1) totalCnt := int32(index + 1)
if mixCount > totalCnt { if mixCount > totalCnt {
mixCount = totalCnt mixCount = totalCnt
...@@ -154,7 +153,7 @@ func (p *privacy) getGlobalUtxoIndex(getUtxoIndexReq *pty.ReqUTXOGlobalIndex) (t ...@@ -154,7 +153,7 @@ func (p *privacy) getGlobalUtxoIndex(getUtxoIndexReq *pty.ReqUTXOGlobalIndex) (t
func (p *privacy) ShowAmountsOfUTXO(reqtoken *pty.ReqPrivacyToken) (types.Message, error) { func (p *privacy) ShowAmountsOfUTXO(reqtoken *pty.ReqPrivacyToken) (types.Message, error) {
querydb := p.GetLocalDB() querydb := p.GetLocalDB()
key := CalcprivacyKeyTokenAmountType(reqtoken.Token) key := CalcprivacyKeyTokenAmountType(reqtoken.GetAssetExec(), reqtoken.GetAssetSymbol())
replyAmounts := &pty.ReplyPrivacyAmounts{} replyAmounts := &pty.ReplyPrivacyAmounts{}
value, err := querydb.Get(key) value, err := querydb.Get(key)
if err != nil { if err != nil {
...@@ -182,7 +181,7 @@ func (p *privacy) ShowUTXOs4SpecifiedAmount(reqtoken *pty.ReqPrivacyToken) (type ...@@ -182,7 +181,7 @@ func (p *privacy) ShowUTXOs4SpecifiedAmount(reqtoken *pty.ReqPrivacyToken) (type
querydb := p.GetLocalDB() querydb := p.GetLocalDB()
var replyUTXOsOfAmount pty.ReplyUTXOsOfAmount var replyUTXOsOfAmount pty.ReplyUTXOsOfAmount
values, err := querydb.List(CalcPrivacyUTXOkeyHeightPrefix(reqtoken.Token, reqtoken.Amount), nil, 0, 0) values, err := querydb.List(CalcPrivacyUTXOkeyHeightPrefix(reqtoken.GetAssetExec(), reqtoken.GetAssetSymbol(), reqtoken.Amount), nil, 0, 0)
if err != nil { if err != nil {
return &replyUTXOsOfAmount, err return &replyUTXOsOfAmount, err
} }
......
...@@ -61,14 +61,14 @@ func TestPrivacy_Query_ShowAmountsOfUTXO(t *testing.T) { ...@@ -61,14 +61,14 @@ func TestPrivacy_Query_ShowAmountsOfUTXO(t *testing.T) {
{ {
index: 1, index: 1,
params: &pty.ReqPrivacyToken{ params: &pty.ReqPrivacyToken{
Token: "btc", AssetSymbol: "btc",
}, },
expectErr: types.ErrNotFound, expectErr: types.ErrNotFound,
}, },
{ {
index: 2, index: 2,
params: &pty.ReqPrivacyToken{ params: &pty.ReqPrivacyToken{
Token: "bty", AssetSymbol: "bty",
}, },
expectReply: &pty.ReplyPrivacyAmounts{ expectReply: &pty.ReplyPrivacyAmounts{
AmountDetail: []*pty.AmountDetail{ AmountDetail: []*pty.AmountDetail{
...@@ -79,6 +79,8 @@ func TestPrivacy_Query_ShowAmountsOfUTXO(t *testing.T) { ...@@ -79,6 +79,8 @@ func TestPrivacy_Query_ShowAmountsOfUTXO(t *testing.T) {
} }
for _, tc := range queryCases { for _, tc := range queryCases {
req := tc.params.(*pty.ReqPrivacyToken)
req.AssetExec = "coins"
tc.funcName = "ShowAmountsOfUTXO" tc.funcName = "ShowAmountsOfUTXO"
} }
testQuery(mock, queryCases, t) testQuery(mock, queryCases, t)
...@@ -99,14 +101,14 @@ func TestPrivacy_Query_ShowUTXOs4SpecifiedAmount(t *testing.T) { ...@@ -99,14 +101,14 @@ func TestPrivacy_Query_ShowUTXOs4SpecifiedAmount(t *testing.T) {
{ {
index: 1, index: 1,
params: &pty.ReqPrivacyToken{ params: &pty.ReqPrivacyToken{
Token: "bty", AssetSymbol: "bty",
}, },
expectErr: types.ErrNotFound, expectErr: types.ErrNotFound,
}, },
{ {
index: 2, index: 2,
params: &pty.ReqPrivacyToken{ params: &pty.ReqPrivacyToken{
Token: "bty", AssetSymbol: "bty",
Amount: types.Coin, Amount: types.Coin,
}, },
disableReplyCheck: true, disableReplyCheck: true,
...@@ -114,6 +116,8 @@ func TestPrivacy_Query_ShowUTXOs4SpecifiedAmount(t *testing.T) { ...@@ -114,6 +116,8 @@ func TestPrivacy_Query_ShowUTXOs4SpecifiedAmount(t *testing.T) {
} }
for _, tc := range queryCases { for _, tc := range queryCases {
req := tc.params.(*pty.ReqPrivacyToken)
req.AssetExec = "coins"
tc.funcName = "ShowUTXOs4SpecifiedAmount" tc.funcName = "ShowUTXOs4SpecifiedAmount"
} }
testQuery(mock, queryCases, t) testQuery(mock, queryCases, t)
...@@ -139,7 +143,7 @@ func TestPrivacy_Query_GetUTXOGlobalIndex(t *testing.T) { ...@@ -139,7 +143,7 @@ func TestPrivacy_Query_GetUTXOGlobalIndex(t *testing.T) {
{ {
index: 2, index: 2,
params: &pty.ReqUTXOGlobalIndex{ params: &pty.ReqUTXOGlobalIndex{
Tokenname: "btc", AssetSymbol: "btc",
MixCount: 1, MixCount: 1,
Amount: []int64{types.Coin}, Amount: []int64{types.Coin},
}, },
...@@ -149,7 +153,7 @@ func TestPrivacy_Query_GetUTXOGlobalIndex(t *testing.T) { ...@@ -149,7 +153,7 @@ func TestPrivacy_Query_GetUTXOGlobalIndex(t *testing.T) {
{ {
index: 3, index: 3,
params: &pty.ReqUTXOGlobalIndex{ params: &pty.ReqUTXOGlobalIndex{
Tokenname: "bty", AssetSymbol: "bty",
MixCount: 1, MixCount: 1,
Amount: []int64{types.Coin, types.Coin * 2}, Amount: []int64{types.Coin, types.Coin * 2},
}, },
...@@ -159,7 +163,7 @@ func TestPrivacy_Query_GetUTXOGlobalIndex(t *testing.T) { ...@@ -159,7 +163,7 @@ func TestPrivacy_Query_GetUTXOGlobalIndex(t *testing.T) {
{ {
index: 4, index: 4,
params: &pty.ReqUTXOGlobalIndex{ params: &pty.ReqUTXOGlobalIndex{
Tokenname: "bty", AssetSymbol: "bty",
MixCount: 1, MixCount: 1,
Amount: []int64{types.Coin}, Amount: []int64{types.Coin},
}, },
...@@ -168,6 +172,10 @@ func TestPrivacy_Query_GetUTXOGlobalIndex(t *testing.T) { ...@@ -168,6 +172,10 @@ func TestPrivacy_Query_GetUTXOGlobalIndex(t *testing.T) {
} }
for _, tc := range queryCases { for _, tc := range queryCases {
req := tc.params.(*pty.ReqUTXOGlobalIndex)
if req.AssetExec == "" {
req.AssetExec = "coins"
}
tc.funcName = "GetUTXOGlobalIndex" tc.funcName = "GetUTXOGlobalIndex"
} }
testQuery(mock, queryCases, t) testQuery(mock, queryCases, t)
......
...@@ -108,8 +108,9 @@ message ResUTXOPubKeys { ...@@ -108,8 +108,9 @@ message ResUTXOPubKeys {
} }
message ReqPrivacyToken { message ReqPrivacyToken {
string token = 1; string assetExec = 1;
int64 amount = 2; string assetSymbol = 2;
int64 amount = 3;
} }
message AmountDetail { message AmountDetail {
...@@ -126,8 +127,9 @@ message replyUTXOsOfAmount { ...@@ -126,8 +127,9 @@ message replyUTXOsOfAmount {
} }
message ReceiptPrivacyOutput { message ReceiptPrivacyOutput {
string token = 1; string assetExec = 1;
repeated keyOutput keyoutput = 2; string assetSymbol = 2;
repeated keyOutput keyoutput = 3;
} }
//各种amount额度的UTXO在链上的数量 //各种amount额度的UTXO在链上的数量
message AmountsOfUTXO { message AmountsOfUTXO {
...@@ -245,9 +247,10 @@ message UTXOHaveTxHashs { ...@@ -245,9 +247,10 @@ message UTXOHaveTxHashs {
} }
message ReqUTXOGlobalIndex { message ReqUTXOGlobalIndex {
string tokenname = 1; string assetExec = 1;
int32 mixCount = 2; string assetSymbol = 2;
repeated int64 amount = 3; int32 mixCount = 3;
repeated int64 amount = 4;
} }
message UTXOBasic { message UTXOBasic {
...@@ -261,8 +264,6 @@ message UTXOIndex4Amount { ...@@ -261,8 +264,6 @@ message UTXOIndex4Amount {
} }
message ResUTXOGlobalIndex { message ResUTXOGlobalIndex {
string tokenname = 1;
int32 mixCount = 2;
repeated UTXOIndex4Amount utxoIndex4Amount = 3; repeated UTXOIndex4Amount utxoIndex4Amount = 3;
} }
......
...@@ -93,7 +93,7 @@ func testShowPrivacyAccountSpend(t *testing.T, jrpc *jsonclient.JSONClient) erro ...@@ -93,7 +93,7 @@ func testShowPrivacyAccountSpend(t *testing.T, jrpc *jsonclient.JSONClient) erro
} }
func testShowAmountsOfUTXO(t *testing.T, jrpc *jsonclient.JSONClient) error { func testShowAmountsOfUTXO(t *testing.T, jrpc *jsonclient.JSONClient) error {
reqPrivacyToken := pty.ReqPrivacyToken{Token: types.BTY} reqPrivacyToken := pty.ReqPrivacyToken{AssetExec: "coins", AssetSymbol: types.BTY}
var params rpctypes.Query4Jrpc var params rpctypes.Query4Jrpc
params.Execer = pty.PrivacyX params.Execer = pty.PrivacyX
params.FuncName = "ShowAmountsOfUTXO" params.FuncName = "ShowAmountsOfUTXO"
...@@ -106,7 +106,8 @@ func testShowAmountsOfUTXO(t *testing.T, jrpc *jsonclient.JSONClient) error { ...@@ -106,7 +106,8 @@ func testShowAmountsOfUTXO(t *testing.T, jrpc *jsonclient.JSONClient) error {
func testShowUTXOs4SpecifiedAmount(t *testing.T, jrpc *jsonclient.JSONClient) error { func testShowUTXOs4SpecifiedAmount(t *testing.T, jrpc *jsonclient.JSONClient) error {
reqPrivacyToken := pty.ReqPrivacyToken{ reqPrivacyToken := pty.ReqPrivacyToken{
Token: types.BTY, AssetExec: "coins",
AssetSymbol: types.BTY,
Amount: 123456, Amount: 123456,
} }
var params rpctypes.Query4Jrpc var params rpctypes.Query4Jrpc
......
This diff is collapsed.
...@@ -364,7 +364,7 @@ buildInput 构建隐私交易的输入信息 ...@@ -364,7 +364,7 @@ buildInput 构建隐私交易的输入信息
func (policy *privacyPolicy) buildInput(privacykeyParirs *privacy.Privacy, buildInfo *buildInputInfo) (*privacytypes.PrivacyInput, []*privacytypes.UTXOBasics, []*privacytypes.RealKeyInput, []*txOutputInfo, error) { func (policy *privacyPolicy) buildInput(privacykeyParirs *privacy.Privacy, buildInfo *buildInputInfo) (*privacytypes.PrivacyInput, []*privacytypes.UTXOBasics, []*privacytypes.RealKeyInput, []*txOutputInfo, error) {
operater := policy.getWalletOperate() operater := policy.getWalletOperate()
//挑选满足额度的utxo //挑选满足额度的utxo
selectedUtxo, err := policy.selectUTXO(buildInfo.tokenname, buildInfo.sender, buildInfo.amount) selectedUtxo, err := policy.selectUTXO(buildInfo.assetSymbol, buildInfo.sender, buildInfo.amount)
if err != nil { if err != nil {
bizlog.Error("buildInput", "Failed to selectOutput for amount", buildInfo.amount, bizlog.Error("buildInput", "Failed to selectOutput for amount", buildInfo.amount,
"Due to cause", err) "Due to cause", err)
...@@ -375,7 +375,8 @@ func (policy *privacyPolicy) buildInput(privacykeyParirs *privacy.Privacy, build ...@@ -375,7 +375,8 @@ func (policy *privacyPolicy) buildInput(privacykeyParirs *privacy.Privacy, build
}) })
reqGetGlobalIndex := privacytypes.ReqUTXOGlobalIndex{ reqGetGlobalIndex := privacytypes.ReqUTXOGlobalIndex{
Tokenname: buildInfo.tokenname, AssetExec: buildInfo.assetExec,
AssetSymbol: buildInfo.assetSymbol,
MixCount: 0, MixCount: 0,
} }
...@@ -562,7 +563,8 @@ func (policy *privacyPolicy) createPrivacy2PrivacyTx(req *privacytypes.ReqCreate ...@@ -562,7 +563,8 @@ func (policy *privacyPolicy) createPrivacy2PrivacyTx(req *privacytypes.ReqCreate
utxoBurnedAmount = privacytypes.PrivacyTxFee utxoBurnedAmount = privacytypes.PrivacyTxFee
} }
buildInfo := &buildInputInfo{ buildInfo := &buildInputInfo{
tokenname: req.GetTokenname(), assetExec: req.GetAssetExec(),
assetSymbol: req.GetTokenname(),
sender: req.GetFrom(), sender: req.GetFrom(),
amount: req.GetAmount() + utxoBurnedAmount, amount: req.GetAmount() + utxoBurnedAmount,
mixcount: req.GetMixcount(), mixcount: req.GetMixcount(),
...@@ -652,7 +654,8 @@ func (policy *privacyPolicy) createPrivacy2PublicTx(req *privacytypes.ReqCreateP ...@@ -652,7 +654,8 @@ func (policy *privacyPolicy) createPrivacy2PublicTx(req *privacytypes.ReqCreateP
utxoBurnedAmount = privacytypes.PrivacyTxFee utxoBurnedAmount = privacytypes.PrivacyTxFee
} }
buildInfo := &buildInputInfo{ buildInfo := &buildInputInfo{
tokenname: req.GetTokenname(), assetExec: req.GetAssetExec(),
assetSymbol: req.GetTokenname(),
sender: req.GetFrom(), sender: req.GetFrom(),
amount: req.GetAmount() + utxoBurnedAmount, amount: req.GetAmount() + utxoBurnedAmount,
mixcount: req.GetMixcount(), mixcount: req.GetMixcount(),
......
...@@ -16,7 +16,8 @@ type addrAndprivacy struct { ...@@ -16,7 +16,8 @@ type addrAndprivacy struct {
// buildInputInfo 构建隐私交易输入的参数结构 // buildInputInfo 构建隐私交易输入的参数结构
type buildInputInfo struct { type buildInputInfo struct {
tokenname string assetExec string
assetSymbol string
sender string sender string
amount int64 amount int64
mixcount int32 mixcount int32
......
...@@ -40,7 +40,6 @@ message PrepareRetrieve { ...@@ -40,7 +40,6 @@ message PrepareRetrieve {
string defaultAddress = 2; string defaultAddress = 2;
} }
message AssetSymbol { message AssetSymbol {
string exec = 1; string exec = 1;
string symbol = 2; string symbol = 2;
......
...@@ -76,9 +76,7 @@ message EncryptShareNotaryStorage { ...@@ -76,9 +76,7 @@ message EncryptShareNotaryStorage {
bytes nonce = 5; bytes nonce = 5;
} }
service storage { service storage {}
}
//根据txhash去状态数据库中查询存储内容 //根据txhash去状态数据库中查询存储内容
message QueryStorage { message QueryStorage {
string txHash = 1; string txHash = 1;
......
...@@ -18,7 +18,7 @@ message Ticket { ...@@ -18,7 +18,7 @@ message Ticket {
string minerAddress = 6; string minerAddress = 6;
// return wallet // return wallet
string returnAddress = 7; string returnAddress = 7;
//miner Price // miner Price
int64 price = 9; int64 price = 9;
} }
...@@ -41,9 +41,9 @@ message TicketMiner { ...@@ -41,9 +41,9 @@ message TicketMiner {
bytes modify = 4; bytes modify = 4;
//挖到区块时公开 //挖到区块时公开
bytes privHash = 5; bytes privHash = 5;
//VRF计算得到的hash // VRF计算得到的hash
bytes vrfHash = 6; bytes vrfHash = 6;
//VRF计算得到的proof // VRF计算得到的proof
bytes vrfProof = 7; bytes vrfProof = 7;
} }
......
...@@ -87,7 +87,6 @@ message State { ...@@ -87,7 +87,6 @@ message State {
bytes AppHash = 12; bytes AppHash = 12;
} }
message TendermintBlockHeader { message TendermintBlockHeader {
string chainID = 1; string chainID = 1;
int64 height = 2; int64 height = 2;
......
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