Unverified Commit 99eaabec authored by vipwzw's avatar vipwzw Committed by GitHub

Merge pull request #787 from bysomeone/update-privacy-wallet-utxo-manage

Update privacy wallet utxo manage
parents ed28512b 9e95afbe
syntax = "proto3";
package types;
//CycleBoundaryInfo cycle边界信息
message CycleBoundaryInfo{
int64 cycle = 1;
int64 stopHeight = 2;
string stopHash = 3;
// CycleBoundaryInfo cycle边界信息
message CycleBoundaryInfo {
int64 cycle = 1;
int64 stopHeight = 2;
string stopHash = 3;
}
//SuperNode 超级节点信息
message SuperNode{
bytes address = 1;
bytes pubKey = 2;
// SuperNode 超级节点信息
message SuperNode {
bytes address = 1;
bytes pubKey = 2;
}
//VoteItem 投票信息
// VoteItem 投票信息
message VoteItem {
int32 votedNodeIndex = 1; //被投票的节点索引
bytes votedNodeAddress = 2; //被投票的节点地址
int64 cycle = 3; //大周期序号
int64 cycleStart = 4; //大周期起始时间
int64 cycleStop = 5; //大周期终止时间
int64 periodStart = 6; //新节点负责出块的起始时间
int64 periodStop = 7; //新节点负责出块的终止时间
int64 height = 8; //新节点负责出块的起始高度
bytes voteID = 9; //选票ID
CycleBoundaryInfo lastCBInfo = 10;
int64 shuffleType = 11;
repeated SuperNode validators = 12;
repeated SuperNode vrfValidators = 13;
int32 votedNodeIndex = 1; //被投票的节点索引
bytes votedNodeAddress = 2; //被投票的节点地址
int64 cycle = 3; //大周期序号
int64 cycleStart = 4; //大周期起始时间
int64 cycleStop = 5; //大周期终止时间
int64 periodStart = 6; //新节点负责出块的起始时间
int64 periodStop = 7; //新节点负责出块的终止时间
int64 height = 8; //新节点负责出块的起始高度
bytes voteID = 9; //选票ID
CycleBoundaryInfo lastCBInfo = 10;
int64 shuffleType = 11;
repeated SuperNode validators = 12;
repeated SuperNode vrfValidators = 13;
repeated SuperNode noVrfValidators = 14;
}
//DPosVote Dpos共识的节点投票,为达成共识用。
// DPosVote Dpos共识的节点投票,为达成共识用。
message DPosVote {
VoteItem voteItem = 1;
int64 voteTimestamp = 2; //发起投票的时间
int32 voterNodeIndex = 3; //投票节点索引
bytes voterNodeAddress = 4; //投票节点地址
bytes signature = 5; //投票者签名
VoteItem voteItem = 1;
int64 voteTimestamp = 2; //发起投票的时间
int32 voterNodeIndex = 3; //投票节点索引
bytes voterNodeAddress = 4; //投票节点地址
bytes signature = 5; //投票者签名
}
//DPosVoteReply 投票响应。
// DPosVoteReply 投票响应。
message DPosVoteReply {
DPosVote vote = 1;
DPosVote vote = 1;
}
//DPosNotify Dpos委托节点出块周期结束时,通知其他节点进行高度确认及新节点投票。
// DPosNotify Dpos委托节点出块周期结束时,通知其他节点进行高度确认及新节点投票。
message DPosNotify {
VoteItem vote = 1;
int64 heightStop = 2; //新节点负责出块的结束高度
bytes hashStop = 3; //新节点负责出块的结束hash
int64 notifyTimestamp = 4; //发起通知的时间
int32 notifyNodeIndex = 5; //通知节点的索引
bytes notifyNodeAddress= 6; //通知节点的地址
bytes signature = 7; //通知节点的签名
VoteItem vote = 1;
int64 heightStop = 2; //新节点负责出块的结束高度
bytes hashStop = 3; //新节点负责出块的结束hash
int64 notifyTimestamp = 4; //发起通知的时间
int32 notifyNodeIndex = 5; //通知节点的索引
bytes notifyNodeAddress = 6; //通知节点的地址
bytes signature = 7; //通知节点的签名
}
//DPosCBInfo Cycle boundary注册信息。
// DPosCBInfo Cycle boundary注册信息。
message DPosCBInfo {
int64 cycle = 1;
int64 stopHeight = 2;
string stopHash = 3;
string pubkey = 4;
string signature = 5;
}
\ No newline at end of file
int64 cycle = 1;
int64 stopHeight = 2;
string stopHash = 3;
string pubkey = 4;
string signature = 5;
}
......@@ -4,7 +4,7 @@
syntax = "proto3";
//import "common.proto";
// import "common.proto";
import "board.proto";
import "project.proto";
import "rule.proto";
......@@ -27,13 +27,13 @@ message AutonomyAction {
PubVoteProposalProject pubVotePropProject = 8;
TerminateProposalProject tmintPropProject = 9;
// 提案规则修改相关
ProposalRule propRule = 10;
RevokeProposalRule rvkPropRule = 11;
VoteProposalRule votePropRule = 12;
TerminateProposalRule tmintPropRule = 13;
ProposalRule propRule = 10;
RevokeProposalRule rvkPropRule = 11;
VoteProposalRule votePropRule = 12;
TerminateProposalRule tmintPropRule = 13;
// 发展基金转自治系统合约
TransferFund transfer = 14;
Comment commentProp = 15;
TransferFund transfer = 14;
Comment commentProp = 15;
// 提案改变董事会成员
ProposalChange propChange = 16;
RevokeProposalChange rvkPropChange = 17;
......
......@@ -8,21 +8,20 @@ import "lcommon.proto";
package types;
message AutonomyProposalBoard {
ProposalBoard propBoard = 1;
ProposalBoard propBoard = 1;
// 投票该提案的规则
RuleConfig curRule = 2;
RuleConfig curRule = 2;
// 投票董事会
ActiveBoard board = 3;
ActiveBoard board = 3;
// 全体持票人投票结果
VoteResult voteResult = 4;
VoteResult voteResult = 4;
// 状态
int32 status = 5;
string address = 6;
int64 height = 7;
int32 index = 8;
string proposalID = 9;
int32 status = 5;
string address = 6;
int64 height = 7;
int32 index = 8;
string proposalID = 9;
}
// action
......@@ -37,9 +36,9 @@ message ProposalBoard {
// 提案董事会成员
repeated string boards = 5;
// 投票相关
// 投票相关
int64 startBlockHeight = 6; // 提案开始投票高度
int64 endBlockHeight = 7; // 提案结束投票高度
int64 endBlockHeight = 7; // 提案结束投票高度
int64 realEndBlockHeight = 8; // 实际提案结束投票高度
}
......@@ -48,8 +47,8 @@ message RevokeProposalBoard {
}
message VoteProposalBoard {
string proposalID = 1;
bool approve = 2;
string proposalID = 1;
bool approve = 2;
repeated string originAddr = 3;
}
......@@ -79,5 +78,5 @@ message ReqQueryProposalBoard {
}
message ReplyQueryProposalBoard {
repeated AutonomyProposalBoard propBoards = 1;
repeated AutonomyProposalBoard propBoards = 1;
}
\ No newline at end of file
......@@ -8,21 +8,20 @@ import "lcommon.proto";
package types;
message AutonomyProposalChange {
ProposalChange propChange = 1;
ProposalChange propChange = 1;
// 投票该提案的规则
RuleConfig curRule = 2;
RuleConfig curRule = 2;
// 投票董事会
ActiveBoard board = 3;
ActiveBoard board = 3;
// 全体持票人投票结果
VoteResult voteResult = 4;
VoteResult voteResult = 4;
// 状态
int32 status = 5;
string address = 6;
int64 height = 7;
int32 index = 8;
string proposalID = 9;
int32 status = 5;
string address = 6;
int64 height = 7;
int32 index = 8;
string proposalID = 9;
}
// action
......@@ -33,11 +32,11 @@ message ProposalChange {
int32 day = 3;
// 修改董事会成员
repeated Change changes = 4;
repeated Change changes = 4;
// 投票相关
// 投票相关
int64 startBlockHeight = 5; // 提案开始投票高度
int64 endBlockHeight = 6; // 提案结束投票高度
int64 endBlockHeight = 6; // 提案结束投票高度
int64 realEndBlockHeight = 7; // 实际提案结束投票高度
}
......@@ -68,7 +67,7 @@ message ReceiptProposalChange {
message LocalProposalChange {
AutonomyProposalChange propBd = 1;
repeated string comments = 2;
repeated string comments = 2;
}
// query
......@@ -82,5 +81,5 @@ message ReqQueryProposalChange {
}
message ReplyQueryProposalChange {
repeated AutonomyProposalChange propChanges = 1;
repeated AutonomyProposalChange propChanges = 1;
}
\ No newline at end of file
......@@ -8,24 +8,24 @@ package types;
message VoteResult {
// 总票数
int32 totalVotes = 1;
int32 totalVotes = 1;
// 赞成票
int32 approveVotes = 2;
int32 approveVotes = 2;
// 反对票
int32 opposeVotes = 3;
int32 opposeVotes = 3;
// 是否通过
bool pass = 4;
bool pass = 4;
}
message PublicVote {
// 是否需要公示
bool publicity = 1;
bool publicity = 1;
// 总票数
int32 totalVotes = 2;
int32 totalVotes = 2;
// 全体持票人反对票
int32 opposeVotes = 3;
int32 opposeVotes = 3;
// 是否通过
bool pubPass = 4;
bool pubPass = 4;
}
message VotesRecord {
......@@ -34,15 +34,15 @@ message VotesRecord {
message RuleConfig {
// 董事会成员赞成率,以%为单位,只保留整数部分
int32 boardApproveRatio = 1;
int32 boardApproveRatio = 1;
// 全体持票人否决率
int32 pubOpposeRatio = 2;
int32 pubOpposeRatio = 2;
// 提案金额
int64 proposalAmount = 3;
int64 proposalAmount = 3;
// 重大项目公示金额阈值
int64 largeProjectAmount = 4;
int64 largeProjectAmount = 4;
// 重大项目公示时间(以区块数为单位)
int32 publicPeriod = 5;
int32 publicPeriod = 5;
}
message ActiveBoard {
......
......@@ -9,21 +9,21 @@ import "lcommon.proto";
package types;
message AutonomyProposalProject {
ProposalProject propProject = 1;
ProposalProject propProject = 1;
// 投票该提案的规则
RuleConfig curRule = 2;
RuleConfig curRule = 2;
// 投票该提案的董事会成员
repeated string boards = 3;
repeated string boards = 3;
// 董事会投票结果
VoteResult boardVoteRes = 4;
VoteResult boardVoteRes = 4;
// 公示投票
PublicVote pubVote = 5;
PublicVote pubVote = 5;
// 状态
int32 status = 6;
string address = 7;
int64 height = 8;
int32 index = 9;
string proposalID = 10;
int32 status = 6;
string address = 7;
int64 height = 8;
int32 index = 9;
string proposalID = 10;
}
message ProposalProject {
......@@ -42,7 +42,7 @@ message ProposalProject {
string amountDetail = 10; // 经费细则
// 支付相关
string toAddr = 11; // 收款地址
string toAddr = 11; // 收款地址
// 投票相关
int64 startBlockHeight = 12; // 提案开始投票高度
......@@ -61,8 +61,8 @@ message VoteProposalProject {
}
message PubVoteProposalProject {
string proposalID = 1;
bool oppose = 2;
string proposalID = 1;
bool oppose = 2;
repeated string originAddr = 3;
}
......@@ -77,8 +77,8 @@ message ReceiptProposalProject {
}
message LocalProposalProject {
AutonomyProposalProject propPrj = 1;
repeated string comments = 2;
AutonomyProposalProject propPrj = 1;
repeated string comments = 2;
}
// query
......
......@@ -9,16 +9,16 @@ import "lcommon.proto";
package types;
message AutonomyProposalRule {
ProposalRule propRule = 1;
RuleConfig curRule = 2;
ProposalRule propRule = 1;
RuleConfig curRule = 2;
// 全体持票人投票结果
VoteResult voteResult = 3;
VoteResult voteResult = 3;
// 状态
int32 status = 4;
string address = 5;
int64 height = 6;
int32 index = 7;
string proposalID = 8;
int32 status = 4;
string address = 5;
int64 height = 6;
int32 index = 7;
string proposalID = 8;
}
message ProposalRule {
......@@ -28,7 +28,7 @@ message ProposalRule {
int32 day = 3;
// 规则可修改项,如果某项不修改则置为-1
RuleConfig ruleCfg = 4;
RuleConfig ruleCfg = 4;
// 投票相关
int64 startBlockHeight = 5; // 提案开始投票高度
int64 endBlockHeight = 6; // 提案结束投票高度
......@@ -40,8 +40,8 @@ message RevokeProposalRule {
}
message VoteProposalRule {
string proposalID = 1;
bool approve = 2;
string proposalID = 1;
bool approve = 2;
repeated string originAddr = 3;
}
......@@ -51,13 +51,13 @@ message TerminateProposalRule {
// receipt
message ReceiptProposalRule {
AutonomyProposalRule prev = 1;
AutonomyProposalRule current = 2;
AutonomyProposalRule prev = 1;
AutonomyProposalRule current = 2;
}
message LocalProposalRule {
AutonomyProposalRule propRule = 1;
repeated string comments = 2;
repeated string comments = 2;
}
// query
......@@ -76,8 +76,8 @@ message ReplyQueryProposalRule {
// TransferFund action
message TransferFund {
int64 amount = 1;
string note = 2;
int64 amount = 1;
string note = 2;
}
// Comment action
......
......@@ -55,7 +55,7 @@ func (m *AutonomyAction) Reset() { *m = AutonomyAction{} }
func (m *AutonomyAction) String() string { return proto.CompactTextString(m) }
func (*AutonomyAction) ProtoMessage() {}
func (*AutonomyAction) Descriptor() ([]byte, []int) {
return fileDescriptor_autonomy_a527d25057c6879d, []int{0}
return fileDescriptor_autonomy_a0c83c718d92e3be, []int{0}
}
func (m *AutonomyAction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AutonomyAction.Unmarshal(m, b)
......@@ -741,9 +741,9 @@ func init() {
proto.RegisterType((*AutonomyAction)(nil), "types.AutonomyAction")
}
func init() { proto.RegisterFile("autonomy.proto", fileDescriptor_autonomy_a527d25057c6879d) }
func init() { proto.RegisterFile("autonomy.proto", fileDescriptor_autonomy_a0c83c718d92e3be) }
var fileDescriptor_autonomy_a527d25057c6879d = []byte{
var fileDescriptor_autonomy_a0c83c718d92e3be = []byte{
// 504 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x94, 0x4d, 0x6f, 0xd3, 0x40,
0x10, 0x40, 0xd3, 0x40, 0xfa, 0x31, 0x8e, 0x9d, 0x32, 0x2d, 0x60, 0xc2, 0x57, 0xc5, 0xa9, 0xa7,
......
......@@ -45,7 +45,7 @@ func (m *AutonomyProposalBoard) Reset() { *m = AutonomyProposalBoard{} }
func (m *AutonomyProposalBoard) String() string { return proto.CompactTextString(m) }
func (*AutonomyProposalBoard) ProtoMessage() {}
func (*AutonomyProposalBoard) Descriptor() ([]byte, []int) {
return fileDescriptor_board_32b30cbe96ccf177, []int{0}
return fileDescriptor_board_c31efaf3c4bb8f4d, []int{0}
}
func (m *AutonomyProposalBoard) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AutonomyProposalBoard.Unmarshal(m, b)
......@@ -151,7 +151,7 @@ func (m *ProposalBoard) Reset() { *m = ProposalBoard{} }
func (m *ProposalBoard) String() string { return proto.CompactTextString(m) }
func (*ProposalBoard) ProtoMessage() {}
func (*ProposalBoard) Descriptor() ([]byte, []int) {
return fileDescriptor_board_32b30cbe96ccf177, []int{1}
return fileDescriptor_board_c31efaf3c4bb8f4d, []int{1}
}
func (m *ProposalBoard) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ProposalBoard.Unmarshal(m, b)
......@@ -238,7 +238,7 @@ func (m *RevokeProposalBoard) Reset() { *m = RevokeProposalBoard{} }
func (m *RevokeProposalBoard) String() string { return proto.CompactTextString(m) }
func (*RevokeProposalBoard) ProtoMessage() {}
func (*RevokeProposalBoard) Descriptor() ([]byte, []int) {
return fileDescriptor_board_32b30cbe96ccf177, []int{2}
return fileDescriptor_board_c31efaf3c4bb8f4d, []int{2}
}
func (m *RevokeProposalBoard) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RevokeProposalBoard.Unmarshal(m, b)
......@@ -278,7 +278,7 @@ func (m *VoteProposalBoard) Reset() { *m = VoteProposalBoard{} }
func (m *VoteProposalBoard) String() string { return proto.CompactTextString(m) }
func (*VoteProposalBoard) ProtoMessage() {}
func (*VoteProposalBoard) Descriptor() ([]byte, []int) {
return fileDescriptor_board_32b30cbe96ccf177, []int{3}
return fileDescriptor_board_c31efaf3c4bb8f4d, []int{3}
}
func (m *VoteProposalBoard) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VoteProposalBoard.Unmarshal(m, b)
......@@ -330,7 +330,7 @@ func (m *TerminateProposalBoard) Reset() { *m = TerminateProposalBoard{}
func (m *TerminateProposalBoard) String() string { return proto.CompactTextString(m) }
func (*TerminateProposalBoard) ProtoMessage() {}
func (*TerminateProposalBoard) Descriptor() ([]byte, []int) {
return fileDescriptor_board_32b30cbe96ccf177, []int{4}
return fileDescriptor_board_c31efaf3c4bb8f4d, []int{4}
}
func (m *TerminateProposalBoard) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TerminateProposalBoard.Unmarshal(m, b)
......@@ -370,7 +370,7 @@ func (m *ReceiptProposalBoard) Reset() { *m = ReceiptProposalBoard{} }
func (m *ReceiptProposalBoard) String() string { return proto.CompactTextString(m) }
func (*ReceiptProposalBoard) ProtoMessage() {}
func (*ReceiptProposalBoard) Descriptor() ([]byte, []int) {
return fileDescriptor_board_32b30cbe96ccf177, []int{5}
return fileDescriptor_board_c31efaf3c4bb8f4d, []int{5}
}
func (m *ReceiptProposalBoard) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReceiptProposalBoard.Unmarshal(m, b)
......@@ -416,7 +416,7 @@ func (m *LocalProposalBoard) Reset() { *m = LocalProposalBoard{} }
func (m *LocalProposalBoard) String() string { return proto.CompactTextString(m) }
func (*LocalProposalBoard) ProtoMessage() {}
func (*LocalProposalBoard) Descriptor() ([]byte, []int) {
return fileDescriptor_board_32b30cbe96ccf177, []int{6}
return fileDescriptor_board_c31efaf3c4bb8f4d, []int{6}
}
func (m *LocalProposalBoard) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LocalProposalBoard.Unmarshal(m, b)
......@@ -467,7 +467,7 @@ func (m *ReqQueryProposalBoard) Reset() { *m = ReqQueryProposalBoard{} }
func (m *ReqQueryProposalBoard) String() string { return proto.CompactTextString(m) }
func (*ReqQueryProposalBoard) ProtoMessage() {}
func (*ReqQueryProposalBoard) Descriptor() ([]byte, []int) {
return fileDescriptor_board_32b30cbe96ccf177, []int{7}
return fileDescriptor_board_c31efaf3c4bb8f4d, []int{7}
}
func (m *ReqQueryProposalBoard) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqQueryProposalBoard.Unmarshal(m, b)
......@@ -540,7 +540,7 @@ func (m *ReplyQueryProposalBoard) Reset() { *m = ReplyQueryProposalBoard
func (m *ReplyQueryProposalBoard) String() string { return proto.CompactTextString(m) }
func (*ReplyQueryProposalBoard) ProtoMessage() {}
func (*ReplyQueryProposalBoard) Descriptor() ([]byte, []int) {
return fileDescriptor_board_32b30cbe96ccf177, []int{8}
return fileDescriptor_board_c31efaf3c4bb8f4d, []int{8}
}
func (m *ReplyQueryProposalBoard) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyQueryProposalBoard.Unmarshal(m, b)
......@@ -579,9 +579,9 @@ func init() {
proto.RegisterType((*ReplyQueryProposalBoard)(nil), "types.ReplyQueryProposalBoard")
}
func init() { proto.RegisterFile("board.proto", fileDescriptor_board_32b30cbe96ccf177) }
func init() { proto.RegisterFile("board.proto", fileDescriptor_board_c31efaf3c4bb8f4d) }
var fileDescriptor_board_32b30cbe96ccf177 = []byte{
var fileDescriptor_board_c31efaf3c4bb8f4d = []byte{
// 587 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4d, 0x6f, 0xd4, 0x30,
0x10, 0x55, 0x9a, 0x4d, 0xba, 0x99, 0xaa, 0xa8, 0x35, 0x6d, 0xb1, 0xaa, 0x0a, 0xad, 0x72, 0x40,
......
......@@ -45,7 +45,7 @@ func (m *AutonomyProposalChange) Reset() { *m = AutonomyProposalChange{}
func (m *AutonomyProposalChange) String() string { return proto.CompactTextString(m) }
func (*AutonomyProposalChange) ProtoMessage() {}
func (*AutonomyProposalChange) Descriptor() ([]byte, []int) {
return fileDescriptor_change_bc1669622d095f31, []int{0}
return fileDescriptor_change_76e5456ad380528f, []int{0}
}
func (m *AutonomyProposalChange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AutonomyProposalChange.Unmarshal(m, b)
......@@ -149,7 +149,7 @@ func (m *ProposalChange) Reset() { *m = ProposalChange{} }
func (m *ProposalChange) String() string { return proto.CompactTextString(m) }
func (*ProposalChange) ProtoMessage() {}
func (*ProposalChange) Descriptor() ([]byte, []int) {
return fileDescriptor_change_bc1669622d095f31, []int{1}
return fileDescriptor_change_76e5456ad380528f, []int{1}
}
func (m *ProposalChange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ProposalChange.Unmarshal(m, b)
......@@ -231,7 +231,7 @@ func (m *Change) Reset() { *m = Change{} }
func (m *Change) String() string { return proto.CompactTextString(m) }
func (*Change) ProtoMessage() {}
func (*Change) Descriptor() ([]byte, []int) {
return fileDescriptor_change_bc1669622d095f31, []int{2}
return fileDescriptor_change_76e5456ad380528f, []int{2}
}
func (m *Change) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Change.Unmarshal(m, b)
......@@ -276,7 +276,7 @@ func (m *RevokeProposalChange) Reset() { *m = RevokeProposalChange{} }
func (m *RevokeProposalChange) String() string { return proto.CompactTextString(m) }
func (*RevokeProposalChange) ProtoMessage() {}
func (*RevokeProposalChange) Descriptor() ([]byte, []int) {
return fileDescriptor_change_bc1669622d095f31, []int{3}
return fileDescriptor_change_76e5456ad380528f, []int{3}
}
func (m *RevokeProposalChange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RevokeProposalChange.Unmarshal(m, b)
......@@ -315,7 +315,7 @@ func (m *VoteProposalChange) Reset() { *m = VoteProposalChange{} }
func (m *VoteProposalChange) String() string { return proto.CompactTextString(m) }
func (*VoteProposalChange) ProtoMessage() {}
func (*VoteProposalChange) Descriptor() ([]byte, []int) {
return fileDescriptor_change_bc1669622d095f31, []int{4}
return fileDescriptor_change_76e5456ad380528f, []int{4}
}
func (m *VoteProposalChange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VoteProposalChange.Unmarshal(m, b)
......@@ -360,7 +360,7 @@ func (m *TerminateProposalChange) Reset() { *m = TerminateProposalChange
func (m *TerminateProposalChange) String() string { return proto.CompactTextString(m) }
func (*TerminateProposalChange) ProtoMessage() {}
func (*TerminateProposalChange) Descriptor() ([]byte, []int) {
return fileDescriptor_change_bc1669622d095f31, []int{5}
return fileDescriptor_change_76e5456ad380528f, []int{5}
}
func (m *TerminateProposalChange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TerminateProposalChange.Unmarshal(m, b)
......@@ -400,7 +400,7 @@ func (m *ReceiptProposalChange) Reset() { *m = ReceiptProposalChange{} }
func (m *ReceiptProposalChange) String() string { return proto.CompactTextString(m) }
func (*ReceiptProposalChange) ProtoMessage() {}
func (*ReceiptProposalChange) Descriptor() ([]byte, []int) {
return fileDescriptor_change_bc1669622d095f31, []int{6}
return fileDescriptor_change_76e5456ad380528f, []int{6}
}
func (m *ReceiptProposalChange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReceiptProposalChange.Unmarshal(m, b)
......@@ -446,7 +446,7 @@ func (m *LocalProposalChange) Reset() { *m = LocalProposalChange{} }
func (m *LocalProposalChange) String() string { return proto.CompactTextString(m) }
func (*LocalProposalChange) ProtoMessage() {}
func (*LocalProposalChange) Descriptor() ([]byte, []int) {
return fileDescriptor_change_bc1669622d095f31, []int{7}
return fileDescriptor_change_76e5456ad380528f, []int{7}
}
func (m *LocalProposalChange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LocalProposalChange.Unmarshal(m, b)
......@@ -497,7 +497,7 @@ func (m *ReqQueryProposalChange) Reset() { *m = ReqQueryProposalChange{}
func (m *ReqQueryProposalChange) String() string { return proto.CompactTextString(m) }
func (*ReqQueryProposalChange) ProtoMessage() {}
func (*ReqQueryProposalChange) Descriptor() ([]byte, []int) {
return fileDescriptor_change_bc1669622d095f31, []int{8}
return fileDescriptor_change_76e5456ad380528f, []int{8}
}
func (m *ReqQueryProposalChange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqQueryProposalChange.Unmarshal(m, b)
......@@ -570,7 +570,7 @@ func (m *ReplyQueryProposalChange) Reset() { *m = ReplyQueryProposalChan
func (m *ReplyQueryProposalChange) String() string { return proto.CompactTextString(m) }
func (*ReplyQueryProposalChange) ProtoMessage() {}
func (*ReplyQueryProposalChange) Descriptor() ([]byte, []int) {
return fileDescriptor_change_bc1669622d095f31, []int{9}
return fileDescriptor_change_76e5456ad380528f, []int{9}
}
func (m *ReplyQueryProposalChange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyQueryProposalChange.Unmarshal(m, b)
......@@ -610,9 +610,9 @@ func init() {
proto.RegisterType((*ReplyQueryProposalChange)(nil), "types.ReplyQueryProposalChange")
}
func init() { proto.RegisterFile("change.proto", fileDescriptor_change_bc1669622d095f31) }
func init() { proto.RegisterFile("change.proto", fileDescriptor_change_76e5456ad380528f) }
var fileDescriptor_change_bc1669622d095f31 = []byte{
var fileDescriptor_change_76e5456ad380528f = []byte{
// 596 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4d, 0x6f, 0xd4, 0x30,
0x10, 0x55, 0x9a, 0x4d, 0x76, 0x77, 0x4a, 0xab, 0x62, 0xda, 0xc5, 0xaa, 0x00, 0x45, 0x39, 0x40,
......
......@@ -40,7 +40,7 @@ func (m *VoteResult) Reset() { *m = VoteResult{} }
func (m *VoteResult) String() string { return proto.CompactTextString(m) }
func (*VoteResult) ProtoMessage() {}
func (*VoteResult) Descriptor() ([]byte, []int) {
return fileDescriptor_lcommon_46832911ed0f42f1, []int{0}
return fileDescriptor_lcommon_3cf79d051a979aaa, []int{0}
}
func (m *VoteResult) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VoteResult.Unmarshal(m, b)
......@@ -106,7 +106,7 @@ func (m *PublicVote) Reset() { *m = PublicVote{} }
func (m *PublicVote) String() string { return proto.CompactTextString(m) }
func (*PublicVote) ProtoMessage() {}
func (*PublicVote) Descriptor() ([]byte, []int) {
return fileDescriptor_lcommon_46832911ed0f42f1, []int{1}
return fileDescriptor_lcommon_3cf79d051a979aaa, []int{1}
}
func (m *PublicVote) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PublicVote.Unmarshal(m, b)
......@@ -165,7 +165,7 @@ func (m *VotesRecord) Reset() { *m = VotesRecord{} }
func (m *VotesRecord) String() string { return proto.CompactTextString(m) }
func (*VotesRecord) ProtoMessage() {}
func (*VotesRecord) Descriptor() ([]byte, []int) {
return fileDescriptor_lcommon_46832911ed0f42f1, []int{2}
return fileDescriptor_lcommon_3cf79d051a979aaa, []int{2}
}
func (m *VotesRecord) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VotesRecord.Unmarshal(m, b)
......@@ -212,7 +212,7 @@ func (m *RuleConfig) Reset() { *m = RuleConfig{} }
func (m *RuleConfig) String() string { return proto.CompactTextString(m) }
func (*RuleConfig) ProtoMessage() {}
func (*RuleConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_lcommon_46832911ed0f42f1, []int{3}
return fileDescriptor_lcommon_3cf79d051a979aaa, []int{3}
}
func (m *RuleConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RuleConfig.Unmarshal(m, b)
......@@ -281,7 +281,7 @@ func (m *ActiveBoard) Reset() { *m = ActiveBoard{} }
func (m *ActiveBoard) String() string { return proto.CompactTextString(m) }
func (*ActiveBoard) ProtoMessage() {}
func (*ActiveBoard) Descriptor() ([]byte, []int) {
return fileDescriptor_lcommon_46832911ed0f42f1, []int{4}
return fileDescriptor_lcommon_3cf79d051a979aaa, []int{4}
}
func (m *ActiveBoard) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ActiveBoard.Unmarshal(m, b)
......@@ -337,9 +337,9 @@ func init() {
proto.RegisterType((*ActiveBoard)(nil), "types.ActiveBoard")
}
func init() { proto.RegisterFile("lcommon.proto", fileDescriptor_lcommon_46832911ed0f42f1) }
func init() { proto.RegisterFile("lcommon.proto", fileDescriptor_lcommon_3cf79d051a979aaa) }
var fileDescriptor_lcommon_46832911ed0f42f1 = []byte{
var fileDescriptor_lcommon_3cf79d051a979aaa = []byte{
// 352 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xbf, 0x4e, 0xe3, 0x40,
0x10, 0x87, 0xe5, 0xfc, 0xbb, 0x64, 0x72, 0x77, 0xd2, 0x6d, 0x71, 0x72, 0x81, 0x50, 0xe4, 0x02,
......
......@@ -47,7 +47,7 @@ func (m *AutonomyProposalProject) Reset() { *m = AutonomyProposalProject
func (m *AutonomyProposalProject) String() string { return proto.CompactTextString(m) }
func (*AutonomyProposalProject) ProtoMessage() {}
func (*AutonomyProposalProject) Descriptor() ([]byte, []int) {
return fileDescriptor_project_56f3f85d427589c6, []int{0}
return fileDescriptor_project_058c6729c0a157a5, []int{0}
}
func (m *AutonomyProposalProject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AutonomyProposalProject.Unmarshal(m, b)
......@@ -166,7 +166,7 @@ func (m *ProposalProject) Reset() { *m = ProposalProject{} }
func (m *ProposalProject) String() string { return proto.CompactTextString(m) }
func (*ProposalProject) ProtoMessage() {}
func (*ProposalProject) Descriptor() ([]byte, []int) {
return fileDescriptor_project_56f3f85d427589c6, []int{1}
return fileDescriptor_project_058c6729c0a157a5, []int{1}
}
func (m *ProposalProject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ProposalProject.Unmarshal(m, b)
......@@ -302,7 +302,7 @@ func (m *RevokeProposalProject) Reset() { *m = RevokeProposalProject{} }
func (m *RevokeProposalProject) String() string { return proto.CompactTextString(m) }
func (*RevokeProposalProject) ProtoMessage() {}
func (*RevokeProposalProject) Descriptor() ([]byte, []int) {
return fileDescriptor_project_56f3f85d427589c6, []int{2}
return fileDescriptor_project_058c6729c0a157a5, []int{2}
}
func (m *RevokeProposalProject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RevokeProposalProject.Unmarshal(m, b)
......@@ -341,7 +341,7 @@ func (m *VoteProposalProject) Reset() { *m = VoteProposalProject{} }
func (m *VoteProposalProject) String() string { return proto.CompactTextString(m) }
func (*VoteProposalProject) ProtoMessage() {}
func (*VoteProposalProject) Descriptor() ([]byte, []int) {
return fileDescriptor_project_56f3f85d427589c6, []int{3}
return fileDescriptor_project_058c6729c0a157a5, []int{3}
}
func (m *VoteProposalProject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VoteProposalProject.Unmarshal(m, b)
......@@ -388,7 +388,7 @@ func (m *PubVoteProposalProject) Reset() { *m = PubVoteProposalProject{}
func (m *PubVoteProposalProject) String() string { return proto.CompactTextString(m) }
func (*PubVoteProposalProject) ProtoMessage() {}
func (*PubVoteProposalProject) Descriptor() ([]byte, []int) {
return fileDescriptor_project_56f3f85d427589c6, []int{4}
return fileDescriptor_project_058c6729c0a157a5, []int{4}
}
func (m *PubVoteProposalProject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PubVoteProposalProject.Unmarshal(m, b)
......@@ -440,7 +440,7 @@ func (m *TerminateProposalProject) Reset() { *m = TerminateProposalProje
func (m *TerminateProposalProject) String() string { return proto.CompactTextString(m) }
func (*TerminateProposalProject) ProtoMessage() {}
func (*TerminateProposalProject) Descriptor() ([]byte, []int) {
return fileDescriptor_project_56f3f85d427589c6, []int{5}
return fileDescriptor_project_058c6729c0a157a5, []int{5}
}
func (m *TerminateProposalProject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TerminateProposalProject.Unmarshal(m, b)
......@@ -480,7 +480,7 @@ func (m *ReceiptProposalProject) Reset() { *m = ReceiptProposalProject{}
func (m *ReceiptProposalProject) String() string { return proto.CompactTextString(m) }
func (*ReceiptProposalProject) ProtoMessage() {}
func (*ReceiptProposalProject) Descriptor() ([]byte, []int) {
return fileDescriptor_project_56f3f85d427589c6, []int{6}
return fileDescriptor_project_058c6729c0a157a5, []int{6}
}
func (m *ReceiptProposalProject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReceiptProposalProject.Unmarshal(m, b)
......@@ -526,7 +526,7 @@ func (m *LocalProposalProject) Reset() { *m = LocalProposalProject{} }
func (m *LocalProposalProject) String() string { return proto.CompactTextString(m) }
func (*LocalProposalProject) ProtoMessage() {}
func (*LocalProposalProject) Descriptor() ([]byte, []int) {
return fileDescriptor_project_56f3f85d427589c6, []int{7}
return fileDescriptor_project_058c6729c0a157a5, []int{7}
}
func (m *LocalProposalProject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LocalProposalProject.Unmarshal(m, b)
......@@ -577,7 +577,7 @@ func (m *ReqQueryProposalProject) Reset() { *m = ReqQueryProposalProject
func (m *ReqQueryProposalProject) String() string { return proto.CompactTextString(m) }
func (*ReqQueryProposalProject) ProtoMessage() {}
func (*ReqQueryProposalProject) Descriptor() ([]byte, []int) {
return fileDescriptor_project_56f3f85d427589c6, []int{8}
return fileDescriptor_project_058c6729c0a157a5, []int{8}
}
func (m *ReqQueryProposalProject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqQueryProposalProject.Unmarshal(m, b)
......@@ -650,7 +650,7 @@ func (m *ReplyQueryProposalProject) Reset() { *m = ReplyQueryProposalPro
func (m *ReplyQueryProposalProject) String() string { return proto.CompactTextString(m) }
func (*ReplyQueryProposalProject) ProtoMessage() {}
func (*ReplyQueryProposalProject) Descriptor() ([]byte, []int) {
return fileDescriptor_project_56f3f85d427589c6, []int{9}
return fileDescriptor_project_058c6729c0a157a5, []int{9}
}
func (m *ReplyQueryProposalProject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyQueryProposalProject.Unmarshal(m, b)
......@@ -690,9 +690,9 @@ func init() {
proto.RegisterType((*ReplyQueryProposalProject)(nil), "types.ReplyQueryProposalProject")
}
func init() { proto.RegisterFile("project.proto", fileDescriptor_project_56f3f85d427589c6) }
func init() { proto.RegisterFile("project.proto", fileDescriptor_project_058c6729c0a157a5) }
var fileDescriptor_project_56f3f85d427589c6 = []byte{
var fileDescriptor_project_058c6729c0a157a5 = []byte{
// 713 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x5f, 0x6f, 0xd3, 0x3e,
0x14, 0x55, 0x96, 0xa6, 0x5d, 0x6f, 0xbb, 0x3f, 0x3f, 0x6f, 0xbf, 0xce, 0x4c, 0x68, 0xaa, 0xf2,
......
......@@ -42,7 +42,7 @@ func (m *AutonomyProposalRule) Reset() { *m = AutonomyProposalRule{} }
func (m *AutonomyProposalRule) String() string { return proto.CompactTextString(m) }
func (*AutonomyProposalRule) ProtoMessage() {}
func (*AutonomyProposalRule) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{0}
return fileDescriptor_rule_02516e679973cfce, []int{0}
}
func (m *AutonomyProposalRule) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AutonomyProposalRule.Unmarshal(m, b)
......@@ -138,7 +138,7 @@ func (m *ProposalRule) Reset() { *m = ProposalRule{} }
func (m *ProposalRule) String() string { return proto.CompactTextString(m) }
func (*ProposalRule) ProtoMessage() {}
func (*ProposalRule) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{1}
return fileDescriptor_rule_02516e679973cfce, []int{1}
}
func (m *ProposalRule) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ProposalRule.Unmarshal(m, b)
......@@ -218,7 +218,7 @@ func (m *RevokeProposalRule) Reset() { *m = RevokeProposalRule{} }
func (m *RevokeProposalRule) String() string { return proto.CompactTextString(m) }
func (*RevokeProposalRule) ProtoMessage() {}
func (*RevokeProposalRule) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{2}
return fileDescriptor_rule_02516e679973cfce, []int{2}
}
func (m *RevokeProposalRule) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RevokeProposalRule.Unmarshal(m, b)
......@@ -258,7 +258,7 @@ func (m *VoteProposalRule) Reset() { *m = VoteProposalRule{} }
func (m *VoteProposalRule) String() string { return proto.CompactTextString(m) }
func (*VoteProposalRule) ProtoMessage() {}
func (*VoteProposalRule) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{3}
return fileDescriptor_rule_02516e679973cfce, []int{3}
}
func (m *VoteProposalRule) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VoteProposalRule.Unmarshal(m, b)
......@@ -310,7 +310,7 @@ func (m *TerminateProposalRule) Reset() { *m = TerminateProposalRule{} }
func (m *TerminateProposalRule) String() string { return proto.CompactTextString(m) }
func (*TerminateProposalRule) ProtoMessage() {}
func (*TerminateProposalRule) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{4}
return fileDescriptor_rule_02516e679973cfce, []int{4}
}
func (m *TerminateProposalRule) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TerminateProposalRule.Unmarshal(m, b)
......@@ -350,7 +350,7 @@ func (m *ReceiptProposalRule) Reset() { *m = ReceiptProposalRule{} }
func (m *ReceiptProposalRule) String() string { return proto.CompactTextString(m) }
func (*ReceiptProposalRule) ProtoMessage() {}
func (*ReceiptProposalRule) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{5}
return fileDescriptor_rule_02516e679973cfce, []int{5}
}
func (m *ReceiptProposalRule) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReceiptProposalRule.Unmarshal(m, b)
......@@ -396,7 +396,7 @@ func (m *LocalProposalRule) Reset() { *m = LocalProposalRule{} }
func (m *LocalProposalRule) String() string { return proto.CompactTextString(m) }
func (*LocalProposalRule) ProtoMessage() {}
func (*LocalProposalRule) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{6}
return fileDescriptor_rule_02516e679973cfce, []int{6}
}
func (m *LocalProposalRule) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LocalProposalRule.Unmarshal(m, b)
......@@ -447,7 +447,7 @@ func (m *ReqQueryProposalRule) Reset() { *m = ReqQueryProposalRule{} }
func (m *ReqQueryProposalRule) String() string { return proto.CompactTextString(m) }
func (*ReqQueryProposalRule) ProtoMessage() {}
func (*ReqQueryProposalRule) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{7}
return fileDescriptor_rule_02516e679973cfce, []int{7}
}
func (m *ReqQueryProposalRule) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqQueryProposalRule.Unmarshal(m, b)
......@@ -520,7 +520,7 @@ func (m *ReplyQueryProposalRule) Reset() { *m = ReplyQueryProposalRule{}
func (m *ReplyQueryProposalRule) String() string { return proto.CompactTextString(m) }
func (*ReplyQueryProposalRule) ProtoMessage() {}
func (*ReplyQueryProposalRule) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{8}
return fileDescriptor_rule_02516e679973cfce, []int{8}
}
func (m *ReplyQueryProposalRule) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyQueryProposalRule.Unmarshal(m, b)
......@@ -560,7 +560,7 @@ func (m *TransferFund) Reset() { *m = TransferFund{} }
func (m *TransferFund) String() string { return proto.CompactTextString(m) }
func (*TransferFund) ProtoMessage() {}
func (*TransferFund) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{9}
return fileDescriptor_rule_02516e679973cfce, []int{9}
}
func (m *TransferFund) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TransferFund.Unmarshal(m, b)
......@@ -608,7 +608,7 @@ func (m *Comment) Reset() { *m = Comment{} }
func (m *Comment) String() string { return proto.CompactTextString(m) }
func (*Comment) ProtoMessage() {}
func (*Comment) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{10}
return fileDescriptor_rule_02516e679973cfce, []int{10}
}
func (m *Comment) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Comment.Unmarshal(m, b)
......@@ -663,7 +663,7 @@ func (m *ReceiptProposalComment) Reset() { *m = ReceiptProposalComment{}
func (m *ReceiptProposalComment) String() string { return proto.CompactTextString(m) }
func (*ReceiptProposalComment) ProtoMessage() {}
func (*ReceiptProposalComment) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{11}
return fileDescriptor_rule_02516e679973cfce, []int{11}
}
func (m *ReceiptProposalComment) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReceiptProposalComment.Unmarshal(m, b)
......@@ -727,7 +727,7 @@ func (m *ReqQueryProposalComment) Reset() { *m = ReqQueryProposalComment
func (m *ReqQueryProposalComment) String() string { return proto.CompactTextString(m) }
func (*ReqQueryProposalComment) ProtoMessage() {}
func (*ReqQueryProposalComment) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{12}
return fileDescriptor_rule_02516e679973cfce, []int{12}
}
func (m *ReqQueryProposalComment) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqQueryProposalComment.Unmarshal(m, b)
......@@ -797,7 +797,7 @@ func (m *RelationCmt) Reset() { *m = RelationCmt{} }
func (m *RelationCmt) String() string { return proto.CompactTextString(m) }
func (*RelationCmt) ProtoMessage() {}
func (*RelationCmt) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{13}
return fileDescriptor_rule_02516e679973cfce, []int{13}
}
func (m *RelationCmt) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RelationCmt.Unmarshal(m, b)
......@@ -863,7 +863,7 @@ func (m *ReplyQueryProposalComment) Reset() { *m = ReplyQueryProposalCom
func (m *ReplyQueryProposalComment) String() string { return proto.CompactTextString(m) }
func (*ReplyQueryProposalComment) ProtoMessage() {}
func (*ReplyQueryProposalComment) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{14}
return fileDescriptor_rule_02516e679973cfce, []int{14}
}
func (m *ReplyQueryProposalComment) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyQueryProposalComment.Unmarshal(m, b)
......@@ -908,9 +908,9 @@ func init() {
proto.RegisterType((*ReplyQueryProposalComment)(nil), "types.ReplyQueryProposalComment")
}
func init() { proto.RegisterFile("rule.proto", fileDescriptor_rule_2ed9cd03418a949e) }
func init() { proto.RegisterFile("rule.proto", fileDescriptor_rule_02516e679973cfce) }
var fileDescriptor_rule_2ed9cd03418a949e = []byte{
var fileDescriptor_rule_02516e679973cfce = []byte{
// 733 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4d, 0x6f, 0xd4, 0x3a,
0x14, 0x55, 0x26, 0xc9, 0x7c, 0xdc, 0xf6, 0x55, 0xad, 0xdb, 0xd7, 0x97, 0xd7, 0xf7, 0x84, 0x46,
......
This diff is collapsed.
This diff is collapsed.
......@@ -3,38 +3,38 @@ package echo;
// ping操作action
message Ping {
string msg = 1;
string msg = 1;
}
// pang操作action
message Pang {
string msg = 1;
string msg = 1;
}
// 本执行器的统一Action结构
message EchoAction {
oneof value {
Ping ping = 1;
Pang pang = 2;
Ping ping = 1;
Pang pang = 2;
}
int32 ty = 3;
}
// ping操作生成的日志结构
message PingLog {
string msg = 1;
string echo = 2;
int32 count = 3;
string msg = 1;
string echo = 2;
int32 count = 3;
}
// pang操作生成的日志结构
message PangLog {
string msg = 1;
string echo = 2;
int32 count = 3;
string msg = 1;
string echo = 2;
int32 count = 3;
}
// 查询请求结构
message Query {
string msg = 1;
string msg = 1;
}
// 查询结果结构
message QueryResult {
string msg = 1;
int32 count = 2;
string msg = 1;
int32 count = 2;
}
\ No newline at end of file
......@@ -149,33 +149,33 @@ message EvmQueryResp {
}
message EvmContractCreateReq {
string code = 1;
int64 fee = 2;
string note = 3;
string alias = 4;
string caller = 5;
string abi = 6;
string expire = 7;
string paraName = 8;
string code = 1;
int64 fee = 2;
string note = 3;
string alias = 4;
string caller = 5;
string abi = 6;
string expire = 7;
string paraName = 8;
}
message EvmContractCallReq {
uint64 amount = 1;
string code = 2;
int64 fee = 3;
string note = 4;
string caller = 5;
string abi = 6;
string exec = 7;
string expire = 8;
string paraName = 9;
uint64 amount = 1;
string code = 2;
int64 fee = 3;
string note = 4;
string caller = 5;
string abi = 6;
string exec = 7;
string expire = 8;
string paraName = 9;
}
message EvmContractTransferReq {
string caller = 1;
float amount = 2;
string exec = 3;
string expire = 4;
bool isWithdraw = 5;
string paraName = 6;
string caller = 1;
float amount = 2;
string exec = 3;
string expire = 4;
bool isWithdraw = 5;
string paraName = 6;
}
\ No newline at end of file
This diff is collapsed.
syntax = "proto3";
package types;
message Exchange {
}
message Exchange {}
message ExchangeAction {
oneof value {
LimitOrder limitOrder = 1;
LimitOrder limitOrder = 1;
MarketOrder marketOrder = 2;
RevokeOrder revokeOrder = 3;
}
......@@ -15,11 +14,11 @@ message ExchangeAction {
//限价订单
message LimitOrder {
//交易对
asset leftAsset = 1;
asset leftAsset = 1;
//交易对
asset rightAsset = 2;
asset rightAsset = 2;
//价格
int64 price = 3;
int64 price = 3;
//总量
int64 amount = 4;
//操作, 1为买,2为卖
......@@ -29,7 +28,7 @@ message LimitOrder {
//市价委托
message MarketOrder {
//资产1
asset leftAsset = 1;
asset leftAsset = 1;
//资产2
asset rightAsset = 2;
//总量
......@@ -41,7 +40,7 @@ message MarketOrder {
//撤回订单
message RevokeOrder {
//订单号
int64 orderID = 1;
int64 orderID = 1;
}
//资产类型
message asset {
......@@ -51,9 +50,9 @@ message asset {
//订单信息
message Order {
int64 orderID = 1;
int64 orderID = 1;
oneof value {
LimitOrder limitOrder = 2;
LimitOrder limitOrder = 2;
MarketOrder marketOrder = 3;
}
//挂单类型
......@@ -63,7 +62,7 @@ message Order {
//成交均价
int64 AVG_price = 6;
//余额
int64 balance = 7;
int64 balance = 7;
//状态,0 挂单中ordered, 1 完成completed, 2撤回 revoked
int32 status = 8;
//用户地址
......@@ -77,24 +76,24 @@ message Order {
//查询接口
message QueryMarketDepth {
//资产1
asset leftAsset = 1;
asset leftAsset = 1;
//资产2
asset rightAsset = 2;
//操作, 1为买,2为卖
int32 op = 3;
// 这里用价格作为索引值
string primaryKey = 4;
string primaryKey = 4;
//单页返回多少条记录,默认返回10条,为了系统安全最多单次只能返回20条
int32 count = 5;
}
//市场深度
message MarketDepth {
//资产1
asset leftAsset = 1;
asset leftAsset = 1;
//资产2
asset rightAsset = 2;
//价格
int64 price = 3;
int64 price = 3;
//总量
int64 amount = 4;
//操作, 1为买,2为卖
......@@ -102,14 +101,14 @@ message MarketDepth {
}
//查询接口返回的市场深度列表
message MarketDepthList {
repeated MarketDepth list = 1;
string primaryKey = 2;
repeated MarketDepth list = 1;
string primaryKey = 2;
}
//查询最新得成交信息,外部接口
message QueryHistoryOrderList {
//资产1
asset leftAsset = 1;
asset leftAsset = 1;
//资产2
asset rightAsset = 2;
// 索引值
......@@ -122,7 +121,7 @@ message QueryHistoryOrderList {
//根据orderID去查询订单信息
message QueryOrder {
int64 orderID = 1;
int64 orderID = 1;
}
//根据地址,状态查询用户自己的挂单信息
message QueryOrderList {
......@@ -139,17 +138,14 @@ message QueryOrderList {
}
//订单列表
message OrderList {
repeated Order list = 1;
string primaryKey = 2;
repeated Order list = 1;
string primaryKey = 2;
}
//exchange执行票据日志
// exchange执行票据日志
message ReceiptExchange {
Order order = 1;
Order order = 1;
repeated Order matchOrders = 2;
int64 index = 3;
}
service exchange {
int64 index = 3;
}
service exchange {}
This diff is collapsed.
This diff is collapsed.
......@@ -4,54 +4,54 @@ package types;
// 发行信息
message Issuance {
string issuanceId = 1; //发行ID,一期发行对应一个ID
int64 totalBalance = 2; //当期发行的总金额(ccny)
int64 debtCeiling = 3; //单用户可借出的限额(ccny)
int64 liquidationRatio = 4; //清算比例
int64 collateralValue = 5; //抵押物总数量(bty)
int64 debtValue = 6; //产生的ccny数量
repeated DebtRecord debtRecords = 7; //大户抵押记录
repeated DebtRecord invalidRecords = 8; //大户抵押记录
int32 status = 9; //当期发行的状态,是否关闭
int64 latestLiquidationPrice = 10;//最高清算价格
int64 period = 11;//发行最大期限
int64 latestExpireTime = 12;//最近超期时间
int64 createTime = 13;//创建时间
int64 balance = 14;//剩余可发行ccny
string issuerAddr = 15;//发行地址
string issuanceId = 1; //发行ID,一期发行对应一个ID
int64 totalBalance = 2; //当期发行的总金额(ccny)
int64 debtCeiling = 3; //单用户可借出的限额(ccny)
int64 liquidationRatio = 4; //清算比例
int64 collateralValue = 5; //抵押物总数量(bty)
int64 debtValue = 6; //产生的ccny数量
repeated DebtRecord debtRecords = 7; //大户抵押记录
repeated DebtRecord invalidRecords = 8; //大户抵押记录
int32 status = 9; //当期发行的状态,是否关闭
int64 latestLiquidationPrice = 10; //最高清算价格
int64 period = 11; //发行最大期限
int64 latestExpireTime = 12; //最近超期时间
int64 createTime = 13; //创建时间
int64 balance = 14; //剩余可发行ccny
string issuerAddr = 15; //发行地址
}
// 抵押记录
message DebtRecord {
string accountAddr = 1; //抵押人地址
int64 startTime = 2; //抵押时间
int64 collateralValue = 3; //抵押物价值(bty)
int64 collateralPrice = 4; //抵押物价格
int64 debtValue = 5; //债务价值(ccny)
int64 liquidationPrice = 6; //抵押物清算价格
int32 status = 7; //抵押状态,是否被清算
int64 liquidateTime = 8; //清算时间
int64 expireTime = 9; //超时清算时间
int32 preStatus = 10;//上一次抵押状态,用于告警恢复
string debtId = 11;//借贷id
string issuId = 12;//发行id
string accountAddr = 1; //抵押人地址
int64 startTime = 2; //抵押时间
int64 collateralValue = 3; //抵押物价值(bty)
int64 collateralPrice = 4; //抵押物价格
int64 debtValue = 5; //债务价值(ccny)
int64 liquidationPrice = 6; //抵押物清算价格
int32 status = 7; //抵押状态,是否被清算
int64 liquidateTime = 8; //清算时间
int64 expireTime = 9; //超时清算时间
int32 preStatus = 10; //上一次抵押状态,用于告警恢复
string debtId = 11; //借贷id
string issuId = 12; //发行id
}
// 资产价格记录
message IssuanceAssetPriceRecord {
int64 recordTime = 1; //价格记录时间
int64 btyPrice = 2; //bty价格
int64 recordTime = 1; //价格记录时间
int64 btyPrice = 2; // bty价格
}
// action
message IssuanceAction {
oneof value {
IssuanceCreate create = 1; //创建一期发行
IssuanceDebt debt = 2; //抵押
IssuanceRepay repay = 3; //清算
IssuanceFeed feed = 4; //喂价
IssuanceClose close = 5; //关闭
IssuanceManage manage = 6; //全局配置
IssuanceCreate create = 1; //创建一期发行
IssuanceDebt debt = 2; //抵押
IssuanceRepay repay = 3; //清算
IssuanceFeed feed = 4; //喂价
IssuanceClose close = 5; //关闭
IssuanceManage manage = 6; //全局配置
}
int32 ty = 10;
}
......@@ -62,10 +62,10 @@ message IssuanceManage {
// 创建发行
message IssuanceCreate {
int64 totalBalance = 1; //发行总金额
int64 debtCeiling = 2; //单用户可借出的限额(ccny)
int64 liquidationRatio = 3; //清算比例
int64 period = 4; //发行最大期限
int64 totalBalance = 1; //发行总金额
int64 debtCeiling = 2; //单用户可借出的限额(ccny)
int64 liquidationRatio = 3; //清算比例
int64 period = 4; //发行最大期限
}
// 抵押
......@@ -82,9 +82,9 @@ message IssuanceRepay {
// 喂价
message IssuanceFeed {
int32 collType = 1; //抵押物价格类型(1,bty,2,btc,3,eth...)
repeated int64 price = 2; //喂价
repeated int64 volume = 3; //成交量
int32 collType = 1; //抵押物价格类型(1,bty,2,btc,3,eth...)
repeated int64 price = 2; //喂价
repeated int64 volume = 3; //成交量
}
// 借贷关闭
......@@ -94,16 +94,16 @@ message IssuanceClose {
// exec_local 发行信息
message ReceiptIssuance {
string issuanceId = 1;
string accountAddr = 2;
string debtId = 3;
int32 status = 4;
string issuanceId = 1;
string accountAddr = 2;
string debtId = 3;
int32 status = 4;
}
// exec_local issuid记录信息
message ReceiptIssuanceID {
string issuanceId = 1;
int32 status = 2;
string issuanceId = 1;
int32 status = 2;
}
// exec_local 抵押记录信息列表
......@@ -118,16 +118,16 @@ message ReqIssuanceInfo {
// 返回一期发行信息
message RepIssuanceCurrentInfo {
int32 status = 1; //当期发行的状态,是否关闭
int64 totalBalance = 2; //当期发行总金额(ccny)
int64 debtCeiling = 3; //单用户可借出的限额(ccny)
int64 liquidationRatio = 4; //清算比例
int64 balance = 5; //剩余可借贷金额(ccny)
int64 collateralValue = 6; //抵押物总数量(bty)
int64 debtValue = 7; //产生的ccny数量
int64 period = 8; //发行最大期限
string issuId = 9; //发行ID
int64 createTime = 10;//创建时间
int32 status = 1; //当期发行的状态,是否关闭
int64 totalBalance = 2; //当期发行总金额(ccny)
int64 debtCeiling = 3; //单用户可借出的限额(ccny)
int64 liquidationRatio = 4; //清算比例
int64 balance = 5; //剩余可借贷金额(ccny)
int64 collateralValue = 6; //抵押物总数量(bty)
int64 debtValue = 7; //产生的ccny数量
int64 period = 8; //发行最大期限
string issuId = 9; //发行ID
int64 createTime = 10; //创建时间
}
// 根据ID列表查询多期发行信息
......@@ -142,7 +142,7 @@ message RepIssuanceCurrentInfos {
// 根据发行状态查询
message ReqIssuanceByStatus {
int32 status = 1;
int32 status = 1;
string issuanceId = 2;
}
......@@ -155,7 +155,7 @@ message RepIssuanceIDs {
message ReqIssuanceRecords {
string issuanceId = 1;
string addr = 2;
int32 status = 3;
int32 status = 3;
string debtId = 4;
}
......
This diff is collapsed.
......@@ -9,15 +9,15 @@ message Create {
// call action
message Call {
string name = 1; //exec name
string funcname = 2; //call function name
string args = 3; //json args
string name = 1; // exec name
string funcname = 2; // call function name
string args = 3; // json args
}
message JsAction {
oneof value {
Create create = 1;
Call call = 2;
Create create = 1;
Call call = 2;
}
int32 ty = 3;
}
......
......@@ -35,7 +35,7 @@ func (m *Create) Reset() { *m = Create{} }
func (m *Create) String() string { return proto.CompactTextString(m) }
func (*Create) ProtoMessage() {}
func (*Create) Descriptor() ([]byte, []int) {
return fileDescriptor_js_afd63f08422ad153, []int{0}
return fileDescriptor_js_ce3c26906a820fa8, []int{0}
}
func (m *Create) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Create.Unmarshal(m, b)
......@@ -83,7 +83,7 @@ func (m *Call) Reset() { *m = Call{} }
func (m *Call) String() string { return proto.CompactTextString(m) }
func (*Call) ProtoMessage() {}
func (*Call) Descriptor() ([]byte, []int) {
return fileDescriptor_js_afd63f08422ad153, []int{1}
return fileDescriptor_js_ce3c26906a820fa8, []int{1}
}
func (m *Call) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Call.Unmarshal(m, b)
......@@ -139,7 +139,7 @@ func (m *JsAction) Reset() { *m = JsAction{} }
func (m *JsAction) String() string { return proto.CompactTextString(m) }
func (*JsAction) ProtoMessage() {}
func (*JsAction) Descriptor() ([]byte, []int) {
return fileDescriptor_js_afd63f08422ad153, []int{2}
return fileDescriptor_js_ce3c26906a820fa8, []int{2}
}
func (m *JsAction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_JsAction.Unmarshal(m, b)
......@@ -288,7 +288,7 @@ func (m *JsLog) Reset() { *m = JsLog{} }
func (m *JsLog) String() string { return proto.CompactTextString(m) }
func (*JsLog) ProtoMessage() {}
func (*JsLog) Descriptor() ([]byte, []int) {
return fileDescriptor_js_afd63f08422ad153, []int{3}
return fileDescriptor_js_ce3c26906a820fa8, []int{3}
}
func (m *JsLog) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_JsLog.Unmarshal(m, b)
......@@ -326,7 +326,7 @@ func (m *QueryResult) Reset() { *m = QueryResult{} }
func (m *QueryResult) String() string { return proto.CompactTextString(m) }
func (*QueryResult) ProtoMessage() {}
func (*QueryResult) Descriptor() ([]byte, []int) {
return fileDescriptor_js_afd63f08422ad153, []int{4}
return fileDescriptor_js_ce3c26906a820fa8, []int{4}
}
func (m *QueryResult) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryResult.Unmarshal(m, b)
......@@ -361,9 +361,9 @@ func init() {
proto.RegisterType((*QueryResult)(nil), "jsproto.QueryResult")
}
func init() { proto.RegisterFile("js.proto", fileDescriptor_js_afd63f08422ad153) }
func init() { proto.RegisterFile("js.proto", fileDescriptor_js_ce3c26906a820fa8) }
var fileDescriptor_js_afd63f08422ad153 = []byte{
var fileDescriptor_js_ce3c26906a820fa8 = []byte{
// 231 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x8f, 0xbf, 0x4e, 0xc3, 0x30,
0x10, 0xc6, 0x9b, 0x90, 0xa4, 0xe1, 0x22, 0x40, 0xf2, 0x14, 0xc1, 0x02, 0x66, 0x81, 0x25, 0x42,
......
......@@ -17,28 +17,28 @@ message PurchaseRecords {
}
message Lottery {
string lotteryId = 1;
int32 status = 2;
int64 createHeight = 3;
int64 fund = 4;
int64 purBlockNum = 5;
int64 drawBlockNum = 6;
int64 lastTransToPurState = 7;
int64 lastTransToDrawState = 8;
//map<string, PurchaseRecords> records = 9;
int64 totalPurchasedTxNum = 10;
string createAddr = 11;
int64 round = 12;
int64 luckyNumber = 13;
int64 createOnMain = 14;
int64 lastTransToPurStateOnMain = 15;
int64 lastTransToDrawStateOnMain = 16;
repeated MissingRecord missingRecords = 17;
int64 opRewardRatio = 18;
int64 devRewardRatio = 19;
repeated PurchaseRecords purRecords = 20;
int64 totalAddrNum = 21;
int64 buyAmount = 22;
string lotteryId = 1;
int32 status = 2;
int64 createHeight = 3;
int64 fund = 4;
int64 purBlockNum = 5;
int64 drawBlockNum = 6;
int64 lastTransToPurState = 7;
int64 lastTransToDrawState = 8;
// map<string, PurchaseRecords> records = 9;
int64 totalPurchasedTxNum = 10;
string createAddr = 11;
int64 round = 12;
int64 luckyNumber = 13;
int64 createOnMain = 14;
int64 lastTransToPurStateOnMain = 15;
int64 lastTransToDrawStateOnMain = 16;
repeated MissingRecord missingRecords = 17;
int64 opRewardRatio = 18;
int64 devRewardRatio = 19;
repeated PurchaseRecords purRecords = 20;
int64 totalAddrNum = 21;
int64 buyAmount = 22;
}
message MissingRecord {
......@@ -152,8 +152,8 @@ message ReplyLotteryCurrentInfo {
int64 purBlockNum = 10;
int64 drawBlockNum = 11;
repeated MissingRecord missingRecords = 12;
int64 totalAddrNum = 13;
int64 buyAmount = 14;
int64 totalAddrNum = 13;
int64 buyAmount = 14;
}
message ReplyLotteryHistoryLuckyNumber {
......@@ -218,21 +218,21 @@ message ReplyLotteryPurchaseAddr {
repeated string address = 1;
}
message LotteryGainInfos{
message LotteryGainInfos {
repeated LotteryGainInfo gains = 1;
}
message LotteryGainInfo{
string addr = 1;
int64 buyAmount = 2;
int64 fundAmount = 3;
message LotteryGainInfo {
string addr = 1;
int64 buyAmount = 2;
int64 fundAmount = 3;
}
message LotteryGainRecord{
string addr = 1;
int64 buyAmount = 2;
int64 fundAmount = 3;
int64 round = 4;
message LotteryGainRecord {
string addr = 1;
int64 buyAmount = 2;
int64 fundAmount = 3;
int64 round = 4;
}
message LotteryGainRecords {
......@@ -252,4 +252,3 @@ message ReqLotteryGainInfo {
string addr = 2;
int64 round = 3;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -2,10 +2,10 @@ syntax = "proto3";
package types;
message Norm {
bytes normId = 1;
int64 createTime = 2;
bytes normId = 1;
int64 createTime = 2;
bytes key = 3;
bytes value = 4;
bytes value = 4;
}
message NormAction {
......@@ -17,7 +17,7 @@ message NormAction {
message NormPut {
bytes key = 1;
bytes value = 2;
bytes value = 2;
}
message NormGetKey {
......
......@@ -36,7 +36,7 @@ func (m *Norm) Reset() { *m = Norm{} }
func (m *Norm) String() string { return proto.CompactTextString(m) }
func (*Norm) ProtoMessage() {}
func (*Norm) Descriptor() ([]byte, []int) {
return fileDescriptor_norm_f2aed6c5a9608057, []int{0}
return fileDescriptor_norm_4c7b2dbe1c6a4afc, []int{0}
}
func (m *Norm) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Norm.Unmarshal(m, b)
......@@ -98,7 +98,7 @@ func (m *NormAction) Reset() { *m = NormAction{} }
func (m *NormAction) String() string { return proto.CompactTextString(m) }
func (*NormAction) ProtoMessage() {}
func (*NormAction) Descriptor() ([]byte, []int) {
return fileDescriptor_norm_f2aed6c5a9608057, []int{1}
return fileDescriptor_norm_4c7b2dbe1c6a4afc, []int{1}
}
func (m *NormAction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NormAction.Unmarshal(m, b)
......@@ -216,7 +216,7 @@ func (m *NormPut) Reset() { *m = NormPut{} }
func (m *NormPut) String() string { return proto.CompactTextString(m) }
func (*NormPut) ProtoMessage() {}
func (*NormPut) Descriptor() ([]byte, []int) {
return fileDescriptor_norm_f2aed6c5a9608057, []int{2}
return fileDescriptor_norm_4c7b2dbe1c6a4afc, []int{2}
}
func (m *NormPut) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NormPut.Unmarshal(m, b)
......@@ -261,7 +261,7 @@ func (m *NormGetKey) Reset() { *m = NormGetKey{} }
func (m *NormGetKey) String() string { return proto.CompactTextString(m) }
func (*NormGetKey) ProtoMessage() {}
func (*NormGetKey) Descriptor() ([]byte, []int) {
return fileDescriptor_norm_f2aed6c5a9608057, []int{3}
return fileDescriptor_norm_4c7b2dbe1c6a4afc, []int{3}
}
func (m *NormGetKey) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NormGetKey.Unmarshal(m, b)
......@@ -295,9 +295,9 @@ func init() {
proto.RegisterType((*NormGetKey)(nil), "types.NormGetKey")
}
func init() { proto.RegisterFile("norm.proto", fileDescriptor_norm_f2aed6c5a9608057) }
func init() { proto.RegisterFile("norm.proto", fileDescriptor_norm_4c7b2dbe1c6a4afc) }
var fileDescriptor_norm_f2aed6c5a9608057 = []byte{
var fileDescriptor_norm_4c7b2dbe1c6a4afc = []byte{
// 209 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xca, 0xcb, 0x2f, 0xca,
0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2d, 0xa9, 0x2c, 0x48, 0x2d, 0x56, 0x4a, 0xe3,
......
......@@ -4,34 +4,34 @@ package types;
//事件
message OracleStatus {
string eventID = 1; //事件ID
string addr = 2; //发布者地址
string type = 3; //游戏类别
string subType = 4; //游戏子类别
int64 time = 5; //结果公布参考时间
string content = 6; //事件内容
string introduction = 7; //事件描述
EventStatus status = 8; //操作状态
string source = 9; //数据来源
string result = 10; //事件结果
EventStatus preStatus=11; //上次操作后状态及操作者地址
string eventID = 1; //事件ID
string addr = 2; //发布者地址
string type = 3; //游戏类别
string subType = 4; //游戏子类别
int64 time = 5; //结果公布参考时间
string content = 6; //事件内容
string introduction = 7; //事件描述
EventStatus status = 8; //操作状态
string source = 9; //数据来源
string result = 10; //事件结果
EventStatus preStatus = 11; //上次操作后状态及操作者地址
}
// action
message OracleAction {
oneof value {
EventPublish eventPublish = 1;
EventAbort eventAbort = 2;
ResultPrePublish resultPrePublish = 3;
ResultPublish resultPublish = 4;
ResultAbort resultAbort = 5;
EventPublish eventPublish = 1;
EventAbort eventAbort = 2;
ResultPrePublish resultPrePublish = 3;
ResultPublish resultPublish = 4;
ResultAbort resultAbort = 5;
}
int32 Ty = 7;
}
message EventStatus {
string opAddr = 1; //修改事件状态的地址
int32 status = 2; //事件状态
int32 status = 2; //事件状态
}
message EventPublish {
......@@ -43,23 +43,23 @@ message EventPublish {
}
message EventAbort {
string eventID = 2; //发布事件的ID
string eventID = 2; //发布事件的ID
}
message ResultPrePublish {
string eventID = 2; //发布事件的ID
string source = 3; //数据来源
string result = 4; //发布数据
string eventID = 2; //发布事件的ID
string source = 3; //数据来源
string result = 4; //发布数据
}
message ResultPublish {
string eventID = 2; //发布事件的ID
string source = 3; //数据来源
string result = 4; //发布数据
string eventID = 2; //发布事件的ID
string source = 3; //数据来源
string result = 4; //发布数据
}
message ResultAbort {
string eventID = 2; //发布事件的ID
string eventID = 2; //发布事件的ID
}
// localDB
......@@ -72,22 +72,22 @@ message QueryOracleInfos {
}
message ReplyEventIDs {
repeated string eventID = 1; //发布事件的ID
repeated string eventID = 1; //发布事件的ID
}
message QueryEventID {
int32 status = 1; //事件状态
string addr = 2; //事件发布者的地址
string type = 3; //事件类型
string eventID = 4; //事件ID
int32 status = 1; //事件状态
string addr = 2; //事件发布者的地址
string type = 3; //事件类型
string eventID = 4; //事件ID
}
message ReceiptOracle {
string eventID = 1; //发布事件ID
int32 status = 2; //事件状态
string addr = 3; //事件发布者的地址
string type = 4; //事件类型
int32 preStatus = 6;//事件的前一个状态
string eventID = 1; //发布事件ID
int32 status = 2; //事件状态
string addr = 3; //事件发布者的地址
string type = 4; //事件类型
int32 preStatus = 6; //事件的前一个状态
}
message ReplyOracleStatusList {
......
......@@ -44,7 +44,7 @@ func (m *OracleStatus) Reset() { *m = OracleStatus{} }
func (m *OracleStatus) String() string { return proto.CompactTextString(m) }
func (*OracleStatus) ProtoMessage() {}
func (*OracleStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_oracle_d3fda31ac2bc59b9, []int{0}
return fileDescriptor_oracle_5d34cbf8ecdaf0be, []int{0}
}
func (m *OracleStatus) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OracleStatus.Unmarshal(m, b)
......@@ -160,7 +160,7 @@ func (m *OracleAction) Reset() { *m = OracleAction{} }
func (m *OracleAction) String() string { return proto.CompactTextString(m) }
func (*OracleAction) ProtoMessage() {}
func (*OracleAction) Descriptor() ([]byte, []int) {
return fileDescriptor_oracle_d3fda31ac2bc59b9, []int{1}
return fileDescriptor_oracle_5d34cbf8ecdaf0be, []int{1}
}
func (m *OracleAction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OracleAction.Unmarshal(m, b)
......@@ -406,7 +406,7 @@ func (m *EventStatus) Reset() { *m = EventStatus{} }
func (m *EventStatus) String() string { return proto.CompactTextString(m) }
func (*EventStatus) ProtoMessage() {}
func (*EventStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_oracle_d3fda31ac2bc59b9, []int{2}
return fileDescriptor_oracle_5d34cbf8ecdaf0be, []int{2}
}
func (m *EventStatus) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EventStatus.Unmarshal(m, b)
......@@ -455,7 +455,7 @@ func (m *EventPublish) Reset() { *m = EventPublish{} }
func (m *EventPublish) String() string { return proto.CompactTextString(m) }
func (*EventPublish) ProtoMessage() {}
func (*EventPublish) Descriptor() ([]byte, []int) {
return fileDescriptor_oracle_d3fda31ac2bc59b9, []int{3}
return fileDescriptor_oracle_5d34cbf8ecdaf0be, []int{3}
}
func (m *EventPublish) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EventPublish.Unmarshal(m, b)
......@@ -521,7 +521,7 @@ func (m *EventAbort) Reset() { *m = EventAbort{} }
func (m *EventAbort) String() string { return proto.CompactTextString(m) }
func (*EventAbort) ProtoMessage() {}
func (*EventAbort) Descriptor() ([]byte, []int) {
return fileDescriptor_oracle_d3fda31ac2bc59b9, []int{4}
return fileDescriptor_oracle_5d34cbf8ecdaf0be, []int{4}
}
func (m *EventAbort) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EventAbort.Unmarshal(m, b)
......@@ -561,7 +561,7 @@ func (m *ResultPrePublish) Reset() { *m = ResultPrePublish{} }
func (m *ResultPrePublish) String() string { return proto.CompactTextString(m) }
func (*ResultPrePublish) ProtoMessage() {}
func (*ResultPrePublish) Descriptor() ([]byte, []int) {
return fileDescriptor_oracle_d3fda31ac2bc59b9, []int{5}
return fileDescriptor_oracle_5d34cbf8ecdaf0be, []int{5}
}
func (m *ResultPrePublish) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ResultPrePublish.Unmarshal(m, b)
......@@ -615,7 +615,7 @@ func (m *ResultPublish) Reset() { *m = ResultPublish{} }
func (m *ResultPublish) String() string { return proto.CompactTextString(m) }
func (*ResultPublish) ProtoMessage() {}
func (*ResultPublish) Descriptor() ([]byte, []int) {
return fileDescriptor_oracle_d3fda31ac2bc59b9, []int{6}
return fileDescriptor_oracle_5d34cbf8ecdaf0be, []int{6}
}
func (m *ResultPublish) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ResultPublish.Unmarshal(m, b)
......@@ -667,7 +667,7 @@ func (m *ResultAbort) Reset() { *m = ResultAbort{} }
func (m *ResultAbort) String() string { return proto.CompactTextString(m) }
func (*ResultAbort) ProtoMessage() {}
func (*ResultAbort) Descriptor() ([]byte, []int) {
return fileDescriptor_oracle_d3fda31ac2bc59b9, []int{7}
return fileDescriptor_oracle_5d34cbf8ecdaf0be, []int{7}
}
func (m *ResultAbort) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ResultAbort.Unmarshal(m, b)
......@@ -706,7 +706,7 @@ func (m *EventRecord) Reset() { *m = EventRecord{} }
func (m *EventRecord) String() string { return proto.CompactTextString(m) }
func (*EventRecord) ProtoMessage() {}
func (*EventRecord) Descriptor() ([]byte, []int) {
return fileDescriptor_oracle_d3fda31ac2bc59b9, []int{8}
return fileDescriptor_oracle_5d34cbf8ecdaf0be, []int{8}
}
func (m *EventRecord) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EventRecord.Unmarshal(m, b)
......@@ -744,7 +744,7 @@ func (m *QueryOracleInfos) Reset() { *m = QueryOracleInfos{} }
func (m *QueryOracleInfos) String() string { return proto.CompactTextString(m) }
func (*QueryOracleInfos) ProtoMessage() {}
func (*QueryOracleInfos) Descriptor() ([]byte, []int) {
return fileDescriptor_oracle_d3fda31ac2bc59b9, []int{9}
return fileDescriptor_oracle_5d34cbf8ecdaf0be, []int{9}
}
func (m *QueryOracleInfos) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryOracleInfos.Unmarshal(m, b)
......@@ -782,7 +782,7 @@ func (m *ReplyEventIDs) Reset() { *m = ReplyEventIDs{} }
func (m *ReplyEventIDs) String() string { return proto.CompactTextString(m) }
func (*ReplyEventIDs) ProtoMessage() {}
func (*ReplyEventIDs) Descriptor() ([]byte, []int) {
return fileDescriptor_oracle_d3fda31ac2bc59b9, []int{10}
return fileDescriptor_oracle_5d34cbf8ecdaf0be, []int{10}
}
func (m *ReplyEventIDs) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyEventIDs.Unmarshal(m, b)
......@@ -823,7 +823,7 @@ func (m *QueryEventID) Reset() { *m = QueryEventID{} }
func (m *QueryEventID) String() string { return proto.CompactTextString(m) }
func (*QueryEventID) ProtoMessage() {}
func (*QueryEventID) Descriptor() ([]byte, []int) {
return fileDescriptor_oracle_d3fda31ac2bc59b9, []int{11}
return fileDescriptor_oracle_5d34cbf8ecdaf0be, []int{11}
}
func (m *QueryEventID) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryEventID.Unmarshal(m, b)
......@@ -886,7 +886,7 @@ func (m *ReceiptOracle) Reset() { *m = ReceiptOracle{} }
func (m *ReceiptOracle) String() string { return proto.CompactTextString(m) }
func (*ReceiptOracle) ProtoMessage() {}
func (*ReceiptOracle) Descriptor() ([]byte, []int) {
return fileDescriptor_oracle_d3fda31ac2bc59b9, []int{12}
return fileDescriptor_oracle_5d34cbf8ecdaf0be, []int{12}
}
func (m *ReceiptOracle) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReceiptOracle.Unmarshal(m, b)
......@@ -952,7 +952,7 @@ func (m *ReplyOracleStatusList) Reset() { *m = ReplyOracleStatusList{} }
func (m *ReplyOracleStatusList) String() string { return proto.CompactTextString(m) }
func (*ReplyOracleStatusList) ProtoMessage() {}
func (*ReplyOracleStatusList) Descriptor() ([]byte, []int) {
return fileDescriptor_oracle_d3fda31ac2bc59b9, []int{13}
return fileDescriptor_oracle_5d34cbf8ecdaf0be, []int{13}
}
func (m *ReplyOracleStatusList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyOracleStatusList.Unmarshal(m, b)
......@@ -996,9 +996,9 @@ func init() {
proto.RegisterType((*ReplyOracleStatusList)(nil), "types.ReplyOracleStatusList")
}
func init() { proto.RegisterFile("oracle.proto", fileDescriptor_oracle_d3fda31ac2bc59b9) }
func init() { proto.RegisterFile("oracle.proto", fileDescriptor_oracle_5d34cbf8ecdaf0be) }
var fileDescriptor_oracle_d3fda31ac2bc59b9 = []byte{
var fileDescriptor_oracle_5d34cbf8ecdaf0be = []byte{
// 579 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4d, 0x8b, 0xdb, 0x3c,
0x10, 0x8e, 0x3f, 0xf7, 0xdd, 0xb1, 0xf7, 0x25, 0x55, 0xbf, 0x74, 0xe8, 0x21, 0xf8, 0xd0, 0x4d,
......
......@@ -883,19 +883,19 @@ function para_nodemanage_node_behalf_join() {
}
function check_privacy_utxo() {
echo '#check utxo balance, addr='"${2}"', token='"${3}"', expect='"${4}"
echo '#check utxo balance, addr='"${2}"', assetExec='"${3}"', token='"${4}"', expect='"${5}"
local times=10
while true; do
acc=$(${1} privacy showpai -a "${2}" -s "${3}" | jq -r ".AvailableAmount")
acc=$(${1} privacy showpai -a "${2}" -e "${3}" -s "${4}" | jq -r ".AvailableAmount")
echo "utxo avail balance is ${acc} "
if [[ ${acc} == "${4}" ]]; then
if [[ ${acc} == "${5}" ]]; then
break
else
block_wait "${1}" 1
times=$((times - 1))
if [ $times -le 0 ]; then
echo "check privacy utxo failed"
${1} privacy showpai -a "${2}" -s "${3}"
${1} privacy showpai -a "${2}" -e "${3}" -s "${4}"
exit 1
fi
fi
......@@ -917,20 +917,20 @@ function privacy_transfer_test() {
echo "#privacy pub2priv, to=14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
${1} send privacy pub2priv -a 9 -p fcbb75f2b96b6d41f301f2d1abc853d697818427819f412f8e4b4e12cacc0814d2c3914b27bea9151b8968ed1732bd241c8788a332b295b731aee8d39a060388 -e coins -s BTY -k 1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4
${1} send privacy pub2priv -a 9 -p fcbb75f2b96b6d41f301f2d1abc853d697818427819f412f8e4b4e12cacc0814d2c3914b27bea9151b8968ed1732bd241c8788a332b295b731aee8d39a060388 -e token -s GD -k 1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4
check_privacy_utxo "${1}" 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt GD 9.0000
check_privacy_utxo "${1}" 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt BTY 9.0000
check_privacy_utxo "${1}" 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt token GD 9.0000
check_privacy_utxo "${1}" 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt coins BTY 9.0000
echo "#privacy priv2priv, to=1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4"
${1} send privacy priv2priv -a 3 -p 5b0ff936ec2d2825a67a270e34d741d96bf6afe5d4b5692de0a1627f635fd0b3d7b14e44d3f8f7526030a7c59de482084161b441a5d66b483d80316e3b91482b -f 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt -e coins -s BTY -k 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt
${1} send privacy priv2priv -a 3 -p 5b0ff936ec2d2825a67a270e34d741d96bf6afe5d4b5692de0a1627f635fd0b3d7b14e44d3f8f7526030a7c59de482084161b441a5d66b483d80316e3b91482b -f 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt -e token -s GD -k 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt
check_privacy_utxo "${1}" 1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4 GD 3.0000
check_privacy_utxo "${1}" 1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4 BTY 3.0000
check_privacy_utxo "${1}" 1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4 token GD 3.0000
check_privacy_utxo "${1}" 1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4 coins BTY 3.0000
echo "#privacy priv2pub, to=1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4"
${1} send privacy priv2pub -a 6 -t 1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4 -f 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt -e coins -s BTY -k 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt
${1} send privacy priv2pub -a 6 -t 1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4 -f 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt -e token -s GD -k 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt
check_privacy_utxo "${1}" 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt GD 0.0000
check_privacy_utxo "${1}" 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt BTY 0.0000
check_privacy_utxo "${1}" 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt token GD 0.0000
check_privacy_utxo "${1}" 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt coins BTY 0.0000
}
function para_test() {
......
This diff is collapsed.
This diff is collapsed.
......@@ -4,40 +4,40 @@ package types;
//斗牛游戏内容
message PokerBull {
string gameId = 1; //默认是由创建这局游戏的txHash作为gameId
int32 status = 2; // Start 1 -> Continue 2 -> Quit 3
int64 startTime = 3; //开始时间
string startTxHash = 4; //游戏启动交易hash
int64 value = 5; //赌注
PBPoker poker = 6; //扑克牌
repeated PBPlayer players = 7; //玩家历史牌和结果集
int32 playerNum = 8; //玩家数
repeated PBResult results = 9; //游戏结果集
int64 index = 10; //索引
int64 prevIndex = 11; //上级索引
int64 quitTime = 12; //游戏结束时间
string quitTxHash = 13; //游戏结束交易hash
string dealerAddr = 14; //下局庄家地址
bool isWaiting = 15; //游戏是否处于等待状态
int32 preStatus = 16; //上一index的状态
int32 round = 17; //当前游戏回合数
string gameId = 1; //默认是由创建这局游戏的txHash作为gameId
int32 status = 2; // Start 1 -> Continue 2 -> Quit 3
int64 startTime = 3; //开始时间
string startTxHash = 4; //游戏启动交易hash
int64 value = 5; //赌注
PBPoker poker = 6; //扑克牌
repeated PBPlayer players = 7; //玩家历史牌和结果集
int32 playerNum = 8; //玩家数
repeated PBResult results = 9; //游戏结果集
int64 index = 10; //索引
int64 prevIndex = 11; //上级索引
int64 quitTime = 12; //游戏结束时间
string quitTxHash = 13; //游戏结束交易hash
string dealerAddr = 14; //下局庄家地址
bool isWaiting = 15; //游戏是否处于等待状态
int32 preStatus = 16; //上一index的状态
int32 round = 17; //当前游戏回合数
}
//一把牌
message PBHand {
repeated int32 cards = 1; //一把牌,五张
int32 result = 2; //斗牛结果 (没牛:0, 牛1-9:1-9, 牛牛:10)
string address = 3; //玩家地址
bool isWin = 4; //是否赢庄家
int32 leverage = 5; //赌注倍数
repeated int32 cards = 1; //一把牌,五张
int32 result = 2; //斗牛结果 (没牛:0, 牛1-9:1-9, 牛牛:10)
string address = 3; //玩家地址
bool isWin = 4; //是否赢庄家
int32 leverage = 5; //赌注倍数
}
//玩家
message PBPlayer {
repeated PBHand hands = 1; //历史发牌和斗牛结果
string address = 2; //玩家地址
int64 txHash = 3; //发牌随机数因子txhash的整数格式
bool ready = 4; //continue状态下,是否ready
repeated PBHand hands = 1; //历史发牌和斗牛结果
string address = 2; //玩家地址
int64 txHash = 3; //发牌随机数因子txhash的整数格式
bool ready = 4; // continue状态下,是否ready
}
//本局游戏结果
......@@ -58,11 +58,11 @@ message PBPoker {
//游戏状态
message PBGameAction {
oneof value {
PBGameStart start = 1;
PBGameStart start = 1;
PBGameContinue continue = 2;
PBGameQuit quit = 3;
PBGameQuery query = 4;
PBGamePlay play = 5;
PBGameQuit quit = 3;
PBGameQuery query = 4;
PBGamePlay play = 5;
}
int32 ty = 10;
}
......@@ -90,9 +90,9 @@ message PBGameQuery {
//已匹配玩家直接游戏
message PBGamePlay {
string gameId = 1; //游戏id
int32 round = 2; //当前游戏回合数
int64 value = 3; //当前游戏赌注
string gameId = 1; //游戏id
int32 round = 2; //当前游戏回合数
int64 value = 3; //当前游戏赌注
repeated string address = 4; //玩家地址
}
......@@ -150,13 +150,13 @@ message QueryPBGameByRound {
// ReplyPBGameByRound 某一回合游戏结果
message ReplyPBGameByRound {
string gameId = 1;
int32 status = 2;
PBResult result = 3;
bool isWaiting = 4;
int64 value = 5;
repeated PBPlayer players = 6;
int64 return = 7;
string gameId = 1;
int32 status = 2;
PBResult result = 3;
bool isWaiting = 4;
int64 value = 5;
repeated PBPlayer players = 6;
int64 return = 7;
}
message ReceiptPBGame {
......@@ -169,8 +169,8 @@ message ReceiptPBGame {
int64 value = 7;
bool isWaiting = 8;
repeated string players = 9;
int32 preStatus = 10;
int32 round = 11;
int32 preStatus = 10;
int32 round = 11;
}
message PBStartTxReq {
......@@ -193,4 +193,3 @@ message PBQueryReq {
string gameId = 1;
int64 fee = 2;
}
This diff is collapsed.
......@@ -9,12 +9,12 @@ source ../dapp-test-common.sh
MAIN_HTTP=""
privacy_CreateRawTransaction() {
req='{"method":"privacy.CreateRawTransaction","params":[{"pubkeypair":"0a9d212b2505aefaa8da370319088bbccfac097b007f52ed71d8133456c8185823c8eac43c5e937953d7b6c8e68b0db1f4f03df4946a29f524875118960a35fb", "assetExec":"coins", "tokenname":"BTY", "type":1, "amount":100000000}]}'
req='{"method":"privacy.CreateRawTransaction","params":[{"pubkeypair":"0a9d212b2505aefaa8da370319088bbccfac097b007f52ed71d8133456c8185823c8eac43c5e937953d7b6c8e68b0db1f4f03df4946a29f524875118960a35fb", "assetExec":"coins", "tokenname":"BTY", "actionType":101, "amount":100000000}]}'
chain33_Http "$req" ${MAIN_HTTP} '.error|not' "$FUNCNAME"
}
privacy_GetPrivacyTxByAddr() {
chain33_Http '{"method":"privacy.GetPrivacyTxByAddr","params":[{"tokenname":"BTY","sendRecvFlag":0,"from":"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv", "direction":1, "count":1}]}' ${MAIN_HTTP} '.error|not' "$FUNCNAME"
chain33_Http '{"method":"privacy.GetPrivacyTxByAddr","params":[{"assetExec":"coins", "tokenname":"BTY","sendRecvFlag":0,"from":"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv", "direction":1, "count":1}]}' ${MAIN_HTTP} '.error|not' "$FUNCNAME"
}
privacy_ShowPrivacyKey() {
......@@ -24,12 +24,12 @@ privacy_ShowPrivacyKey() {
}
privacy_ShowPrivacyAccountInfo() {
req='{"method":"privacy.ShowPrivacyAccountInfo", "params":[{"addr":"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv", "token":"BTY", "displaymode":1}]}'
req='{"method":"privacy.ShowPrivacyAccountInfo", "params":[{"addr":"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv", "assetExec":"coins", "token":"BTY", "displaymode":1}]}'
chain33_Http "$req" ${MAIN_HTTP} '(.error|not) and (.result|[has("utxos", "ftxos", "displaymode"), true] | unique | length == 1)' "$FUNCNAME"
}
privacy_ShowPrivacyAccountSpend() {
chain33_Http '{"method":"privacy.ShowPrivacyAccountSpend", "params":[{"addr":"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv", "token":"BTY"}]}' ${MAIN_HTTP} '(.error|not) and .result.utxoHaveTxHashs' "$FUNCNAME"
chain33_Http '{"method":"privacy.ShowPrivacyAccountSpend", "params":[{"addr":"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv", "assetExec":"coins", "token":"BTY"}]}' ${MAIN_HTTP} '(.error|not) and .result.utxoHaveTxHashs' "$FUNCNAME"
}
privacy_RescanUtxos() {
......
......@@ -127,7 +127,7 @@ func createPub2PrivTx(cmd *cobra.Command, args []string) {
params := pty.ReqCreatePrivacyTx{
Tokenname: tokenname,
Type: types.PrivacyTypePublic2Privacy,
ActionType: pty.ActionPublic2Privacy,
Amount: amount,
Note: note,
Pubkeypair: pubkeypair,
......@@ -192,7 +192,7 @@ func createPriv2PrivTx(cmd *cobra.Command, args []string) {
params := pty.ReqCreatePrivacyTx{
Tokenname: tokenname,
Type: types.PrivacyTypePrivacy2Privacy,
ActionType: pty.ActionPrivacy2Privacy,
Amount: amount,
Note: note,
Pubkeypair: pubkeypair,
......@@ -258,15 +258,15 @@ func createPriv2PubTx(cmd *cobra.Command, args []string) {
}
params := pty.ReqCreatePrivacyTx{
Tokenname: tokenname,
Type: types.PrivacyTypePrivacy2Public,
Amount: amount,
Note: note,
From: from,
To: to,
Mixcount: mixCount,
Expire: expire,
AssetExec: assetExec,
Tokenname: tokenname,
ActionType: pty.ActionPrivacy2Public,
Amount: amount,
Note: note,
From: from,
To: to,
Mixcount: mixCount,
Expire: expire,
AssetExec: assetExec,
}
ctx := jsonclient.NewRPCCtx(rpcLaddr, "privacy.CreateRawTransaction", params, nil)
ctx.RunWithoutMarshal()
......@@ -284,6 +284,7 @@ func showPrivacyAccountSpendCmd() *cobra.Command {
func showPrivacyAccountSpendFlag(cmd *cobra.Command) {
cmd.Flags().StringP("addr", "a", "", "account address")
cmd.Flags().StringP("exec", "e", "coins", "asset executor(coins, token, paracross), default coins")
cmd.Flags().StringP("symbol", "s", "BTY", "asset symbol, default BTY")
cmd.MarkFlagRequired("addr")
}
......@@ -291,10 +292,12 @@ func showPrivacyAccountSpendFlag(cmd *cobra.Command) {
func showPrivacyAccountSpend(cmd *cobra.Command, args []string) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
addr, _ := cmd.Flags().GetString("addr")
exec, _ := cmd.Flags().GetString("exec")
symbol, _ := cmd.Flags().GetString("symbol")
params := pty.ReqPrivBal4AddrToken{
Addr: addr,
Token: symbol,
Addr: addr,
Token: symbol,
AssetExec: exec,
}
var res pty.UTXOHaveTxHashs
......@@ -356,12 +359,16 @@ func showAmountsOfUTXOCmd() *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) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
reqPrivacyToken := pty.ReqPrivacyToken{Token: types.BTY}
exec, _ := cmd.Flags().GetString("exec")
symbol, _ := cmd.Flags().GetString("symbol")
reqPrivacyToken := pty.ReqPrivacyToken{AssetExec: exec, AssetSymbol: symbol}
var params rpctypes.Query4Jrpc
params.Execer = pty.PrivacyX
params.FuncName = "ShowAmountsOfUTXO"
......@@ -394,16 +401,20 @@ func showUTXOs4SpecifiedAmountCmd() *cobra.Command {
func showUTXOs4SpecifiedAmountFlag(cmd *cobra.Command) {
cmd.Flags().Float64P("amount", "a", 0, "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) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
amount, _ := cmd.Flags().GetFloat64("amount")
amountInt64 := int64(amount*types.InputPrecision) * types.Multiple1E4
exec, _ := cmd.Flags().GetString("exec")
symbol, _ := cmd.Flags().GetString("symbol")
reqPrivacyToken := pty.ReqPrivacyToken{
Token: types.BTY,
Amount: amountInt64,
AssetExec: exec,
AssetSymbol: symbol,
Amount: amountInt64,
}
var params rpctypes.Query4Jrpc
params.Execer = pty.PrivacyX
......@@ -445,7 +456,7 @@ func showPrivacyAccountInfoCmd() *cobra.Command {
func showPrivacyAccountInfoFlag(cmd *cobra.Command) {
cmd.Flags().StringP("addr", "a", "", "account address")
cmd.MarkFlagRequired("addr")
cmd.Flags().StringP("exec", "e", "coins", "asset executor(coins, token, paracross), default coins")
cmd.Flags().StringP("symbol", "s", "BTY", "asset symbol, default BTY")
cmd.Flags().Int32P("displaymode", "d", 0, "display mode.(0: display collect. 1:display available detail. 2:display frozen detail. 3:display all")
}
......@@ -453,6 +464,7 @@ func showPrivacyAccountInfoFlag(cmd *cobra.Command) {
func showPrivacyAccountInfo(cmd *cobra.Command, args []string) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
addr, _ := cmd.Flags().GetString("addr")
exec, _ := cmd.Flags().GetString("exec")
token, _ := cmd.Flags().GetString("symbol")
mode, _ := cmd.Flags().GetInt32("displaymode")
if mode < 0 || mode > 3 {
......@@ -460,10 +472,11 @@ func showPrivacyAccountInfo(cmd *cobra.Command, args []string) {
return
}
params := pty.ReqPPrivacyAccount{
params := pty.ReqPrivacyAccount{
Addr: addr,
Token: token,
Displaymode: mode,
AssetExec: exec,
}
var res pty.ReplyPrivacyAccount
......@@ -538,6 +551,7 @@ func addListPrivacyTxsFlags(cmd *cobra.Command) {
//
cmd.Flags().Int32P("sendrecv", "", 0, "send or recv flag (0: send, 1: recv), default 0")
cmd.Flags().Int32P("count", "c", 10, "number of transactions, default 10")
cmd.Flags().StringP("exec", "e", "coins", "asset executor(coins, token, paracross), default coins")
cmd.Flags().StringP("token", "", types.BTY, "token name.(BTY supported)")
cmd.Flags().Int32P("direction", "d", 1, "query direction (0: pre page, 1: next page), valid with seedtxhash param")
cmd.Flags().StringP("seedtxhash", "", "", "seed trasnaction hash")
......@@ -551,7 +565,9 @@ func listPrivacyTxsFlags(cmd *cobra.Command, args []string) {
sendRecvFlag, _ := cmd.Flags().GetInt32("sendrecv")
tokenname, _ := cmd.Flags().GetString("token")
seedtxhash, _ := cmd.Flags().GetString("seedtxhash")
exec, _ := cmd.Flags().GetString("exec")
params := pty.ReqPrivacyTransactionList{
AssetExec: exec,
Tokenname: tokenname,
SendRecvFlag: sendRecvFlag,
Direction: direction,
......
......@@ -43,12 +43,9 @@ func (p *privacy) Exec_Public2Privacy(payload *ty.Public2Privacy, tx *types.Tran
value := types.Encode(keyOutput)
receipt.KV = append(receipt.KV, &types.KeyValue{Key: key, Value: value})
}
receiptPrivacyOutput := &ty.ReceiptPrivacyOutput{
Token: payload.Tokenname,
Keyoutput: payload.GetOutput().Keyoutput,
}
execlog := &types.ReceiptLog{Ty: ty.TyLogPrivacyOutput, Log: types.Encode(receiptPrivacyOutput)}
privacylog.Debug("testkey", "output", payload.GetOutput().Keyoutput)
receiptLogs := p.buildPrivacyReceiptLog(payload.GetAssetExec(), payload.GetTokenname(), payload.GetOutput())
execlog := &types.ReceiptLog{Ty: ty.TyLogPrivacyOutput, Log: types.Encode(receiptLogs)}
receipt.Logs = append(receipt.Logs, execlog)
//////////////////debug code begin///////////////
......@@ -82,12 +79,8 @@ func (p *privacy) Exec_Privacy2Privacy(payload *ty.Privacy2Privacy, tx *types.Tr
value := types.Encode(keyOutput)
receipt.KV = append(receipt.KV, &types.KeyValue{Key: key, Value: value})
}
receiptPrivacyOutput := &ty.ReceiptPrivacyOutput{
Token: payload.Tokenname,
Keyoutput: payload.GetOutput().Keyoutput,
}
execlog = &types.ReceiptLog{Ty: ty.TyLogPrivacyOutput, Log: types.Encode(receiptPrivacyOutput)}
receiptLogs := p.buildPrivacyReceiptLog(payload.GetAssetExec(), payload.GetTokenname(), payload.GetOutput())
execlog = &types.ReceiptLog{Ty: ty.TyLogPrivacyOutput, Log: types.Encode(receiptLogs)}
receipt.Logs = append(receipt.Logs, execlog)
receipt.Ty = types.ExecOk
......@@ -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})
}
receiptPrivacyOutput := &ty.ReceiptPrivacyOutput{
Token: payload.Tokenname,
Keyoutput: payload.GetOutput().Keyoutput,
}
execlog = &types.ReceiptLog{Ty: ty.TyLogPrivacyOutput, Log: types.Encode(receiptPrivacyOutput)}
receiptLog := p.buildPrivacyReceiptLog(payload.GetAssetExec(), payload.GetTokenname(), payload.GetOutput())
execlog = &types.ReceiptLog{Ty: ty.TyLogPrivacyOutput, Log: types.Encode(receiptLog)}
receipt.Logs = append(receipt.Logs, execlog)
receipt.Ty = types.ExecOk
......@@ -155,3 +145,16 @@ func (p *privacy) createAccountDB(exec, symbol string) (*account.DB, error) {
cfg := p.GetAPI().GetConfig()
return account.NewAccountDB(cfg, exec, symbol, p.GetStateDB())
}
func (p *privacy) buildPrivacyReceiptLog(assetExec, assetSymbol string, output *ty.PrivacyOutput) *ty.ReceiptPrivacyOutput {
if assetExec == "" {
assetExec = "coins"
}
receipt := &ty.ReceiptPrivacyOutput{
AssetExec: assetExec,
AssetSymbol: assetSymbol,
Keyoutput: output.Keyoutput,
}
return 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)
panic(err)
}
token := receiptPrivacyOutput.Token
assetExec := receiptPrivacyOutput.GetAssetExec()
assetSymbol := receiptPrivacyOutput.GetAssetSymbol()
txhashInByte := tx.Hash()
txhash := common.ToHex(txhashInByte)
for m, keyOutput := range receiptPrivacyOutput.Keyoutput {
//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}
dbSet.KV = append(dbSet.KV, kv)
//kv2,添加各种不同额度的kv记录,能让我们很方便的获知本系统存在的所有不同的额度的UTXO
var amountTypes ty.AmountsOfUTXO
key2 := CalcprivacyKeyTokenAmountType(token)
key2 := CalcprivacyKeyTokenAmountType(assetExec, assetSymbol)
value2, err := localDB.Get(key2)
//如果该种token不是第一次进行隐私操作
if err == nil && value2 != nil {
......@@ -63,15 +63,16 @@ func (p *privacy) execDelLocal(tx *types.Transaction, receiptData *types.Receipt
}
//kv3,添加存在隐私交易token的类型
assetKey := calcExecLocalAssetKey(assetExec, assetSymbol)
var tokenNames ty.TokenNamesOfUTXO
key3 := CalcprivacyKeyTokenTypes()
value3, err := localDB.Get(key3)
if err == nil && value3 != nil {
err := types.Decode(value3, &tokenNames)
if err == nil {
if settxhash, ok := tokenNames.TokensMap[token]; ok {
if settxhash, ok := tokenNames.TokensMap[assetKey]; ok {
if settxhash == txhash {
delete(tokenNames.TokensMap, token)
delete(tokenNames.TokensMap, assetKey)
value3 := types.Encode(&tokenNames)
kv := &types.KeyValue{Key: key3, Value: value3}
dbSet.KV = append(dbSet.KV, kv)
......
......@@ -27,12 +27,13 @@ func (p *privacy) execLocal(receiptData *types.ReceiptData, tx *types.Transactio
panic(err) //数据错误了,已经被修改了
}
token := receiptPrivacyOutput.Token
assetExec := receiptPrivacyOutput.GetAssetExec()
assetSymbol := receiptPrivacyOutput.GetAssetSymbol()
txhashInByte := tx.Hash()
txhash := common.ToHex(txhashInByte)
for outputIndex, keyOutput := range receiptPrivacyOutput.Keyoutput {
//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{
Height: p.GetHeight(),
Txindex: int32(index),
......@@ -46,7 +47,7 @@ func (p *privacy) execLocal(receiptData *types.ReceiptData, tx *types.Transactio
//kv2,添加各种不同额度的kv记录,能让我们很方便的获知本系统存在的所有不同的额度的UTXO
var amountTypes ty.AmountsOfUTXO
key2 := CalcprivacyKeyTokenAmountType(token)
key2 := CalcprivacyKeyTokenAmountType(assetExec, assetSymbol)
value2, err := localDB.Get(key2)
//如果该种token不是第一次进行隐私操作
if err == nil && value2 != nil {
......@@ -78,14 +79,15 @@ func (p *privacy) execLocal(receiptData *types.ReceiptData, tx *types.Transactio
}
//kv3,添加存在隐私交易token的类型
assetKey := calcExecLocalAssetKey(assetExec, assetSymbol)
var tokenNames ty.TokenNamesOfUTXO
key3 := CalcprivacyKeyTokenTypes()
value3, err := localDB.Get(key3)
if err == nil && len(value3) != 0 {
err := types.Decode(value3, &tokenNames)
if err == nil {
if _, ok := tokenNames.TokensMap[token]; !ok {
tokenNames.TokensMap[token] = txhash
if _, ok := tokenNames.TokensMap[assetKey]; !ok {
tokenNames.TokensMap[assetKey] = txhash
kv := &types.KeyValue{Key: key3, Value: types.Encode(&tokenNames)}
dbSet.KV = append(dbSet.KV, kv)
localDB.Set(key3, types.Encode(&tokenNames))
......@@ -93,7 +95,7 @@ func (p *privacy) execLocal(receiptData *types.ReceiptData, tx *types.Transactio
}
} else {
tokenNames.TokensMap = make(map[string]string)
tokenNames.TokensMap[token] = txhash
tokenNames.TokensMap[assetKey] = txhash
kv := &types.KeyValue{Key: key3, Value: types.Encode(&tokenNames)}
dbSet.KV = append(dbSet.KV, kv)
localDB.Set(key3, types.Encode(&tokenNames))
......
......@@ -181,7 +181,7 @@ func TestPrivacy_Exec_Public2Privacy(t *testing.T) {
for _, tc := range tcArr {
req := tc.payload.(*pty.ReqCreatePrivacyTx)
req.Type = types.PrivacyTypePublic2Privacy
req.ActionType = pty.ActionPublic2Privacy
tc.testState = testStateExec
}
testExec(mock, tcArr, testPrivateKeys[0], t)
......@@ -196,7 +196,7 @@ func TestPrivacy_Exec_Privacy2Privacy(t *testing.T) {
{
index: 1,
payload: &pty.ReqCreatePrivacyTx{
Type: types.PrivacyTypePublic2Privacy,
ActionType: pty.ActionPublic2Privacy,
Amount: types.Coin * 9,
Pubkeypair: testPubkeyPairs[0],
},
......@@ -213,8 +213,8 @@ func TestPrivacy_Exec_Privacy2Privacy(t *testing.T) {
for _, tc := range tcArr {
req := tc.payload.(*pty.ReqCreatePrivacyTx)
if req.Type == 0 {
req.Type = types.PrivacyTypePrivacy2Privacy
if req.ActionType == 0 {
req.ActionType = pty.ActionPrivacy2Privacy
}
tc.testState = testStateExec
}
......@@ -230,7 +230,7 @@ func TestPrivacy_Exec_Privacy2Public(t *testing.T) {
{
index: 1,
payload: &pty.ReqCreatePrivacyTx{
Type: types.PrivacyTypePublic2Privacy,
ActionType: pty.ActionPublic2Privacy,
Amount: types.Coin * 9,
Pubkeypair: testPubkeyPairs[0],
},
......@@ -248,8 +248,8 @@ func TestPrivacy_Exec_Privacy2Public(t *testing.T) {
for _, tc := range tcArr {
req := tc.payload.(*pty.ReqCreatePrivacyTx)
if req.Type == 0 {
req.Type = types.PrivacyTypePrivacy2Public
if req.ActionType == 0 {
req.ActionType = pty.ActionPrivacy2Public
}
tc.testState = testStateExec
}
......@@ -265,7 +265,7 @@ func TestPrivacy_ExecLocal(t *testing.T) {
{
index: 1,
payload: &pty.ReqCreatePrivacyTx{
Type: types.PrivacyTypePublic2Privacy,
ActionType: pty.ActionPublic2Privacy,
Amount: types.Coin * 9,
Pubkeypair: testPubkeyPairs[0],
},
......@@ -273,7 +273,7 @@ func TestPrivacy_ExecLocal(t *testing.T) {
{
index: 2,
payload: &pty.ReqCreatePrivacyTx{
Type: types.PrivacyTypePrivacy2Privacy,
ActionType: pty.ActionPrivacy2Privacy,
Amount: types.Coin,
Pubkeypair: testPubkeyPairs[1],
From: testAddrs[0],
......@@ -282,7 +282,7 @@ func TestPrivacy_ExecLocal(t *testing.T) {
{
index: 3,
payload: &pty.ReqCreatePrivacyTx{
Type: types.PrivacyTypePrivacy2Public,
ActionType: pty.ActionPrivacy2Public,
Amount: types.Coin,
Pubkeypair: testPubkeyPairs[1],
From: testAddrs[0],
......@@ -306,7 +306,7 @@ func TestPrivacy_ExecDelLocal(t *testing.T) {
{
index: 1,
payload: &pty.ReqCreatePrivacyTx{
Type: types.PrivacyTypePublic2Privacy,
ActionType: pty.ActionPublic2Privacy,
Amount: types.Coin * 9,
Pubkeypair: testPubkeyPairs[0],
},
......@@ -314,7 +314,7 @@ func TestPrivacy_ExecDelLocal(t *testing.T) {
{
index: 2,
payload: &pty.ReqCreatePrivacyTx{
Type: types.PrivacyTypePrivacy2Privacy,
ActionType: pty.ActionPrivacy2Privacy,
Amount: types.Coin,
Pubkeypair: testPubkeyPairs[1],
From: testAddrs[0],
......@@ -323,7 +323,7 @@ func TestPrivacy_ExecDelLocal(t *testing.T) {
{
index: 3,
payload: &pty.ReqCreatePrivacyTx{
Type: types.PrivacyTypePrivacy2Public,
ActionType: pty.ActionPrivacy2Public,
Amount: types.Coin,
Pubkeypair: testPubkeyPairs[1],
From: testAddrs[0],
......
......@@ -40,21 +40,25 @@ func calcPrivacyKeyImageKey(exec, token string, keyimage []byte) []byte {
}
//CalcPrivacyUTXOkeyHeight 在本地数据库中设置一条可以找到对应amount的对应的utxo的global index
func CalcPrivacyUTXOkeyHeight(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))
func CalcPrivacyUTXOkeyHeight(exec, token string, amount, height int64, txhash string, txindex, outindex int) (key []byte) {
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
func CalcPrivacyUTXOkeyHeightPrefix(token string, amount int64) (key []byte) {
return []byte(fmt.Sprintf(privacyUTXOKEYPrefix+"-%s-%d-", token, amount))
func CalcPrivacyUTXOkeyHeightPrefix(exec, token string, amount int64) (key []byte) {
return []byte(fmt.Sprintf(privacyUTXOKEYPrefix+"-%s-%s-%d-", exec, token, amount))
}
//CalcprivacyKeyTokenAmountType 设置当前系统存在的token的amount的类型,如存在1,3,5,100...等等的类型,
func CalcprivacyKeyTokenAmountType(token string) (key []byte) {
return []byte(fmt.Sprintf(privacyAmountTypePrefix+"-%s-", token))
func CalcprivacyKeyTokenAmountType(exec, token string) (key []byte) {
return []byte(fmt.Sprintf(privacyAmountTypePrefix+"-%s-%s-", exec, token))
}
// CalcprivacyKeyTokenTypes get privacy token types key
func CalcprivacyKeyTokenTypes() (key []byte) {
return []byte(privacyTokenTypesPrefix)
}
func calcExecLocalAssetKey(exec, symbol string) string {
return exec + "-" + symbol
}
......@@ -72,10 +72,10 @@ func (p *privacy) GetDriverName() string {
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()
var utxos []*pty.LocalUTXOItem
prefix := CalcPrivacyUTXOkeyHeightPrefix(tokenName, amount)
prefix := CalcPrivacyUTXOkeyHeightPrefix(exec, tokenName, amount)
values, err := localDB.List(prefix, nil, count, 0)
if err != nil {
return utxos, err
......@@ -97,25 +97,24 @@ func (p *privacy) getUtxosByTokenAndAmount(tokenName string, amount int64, count
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()
utxoGlobalIndexResp := &pty.ResUTXOGlobalIndex{}
tokenName := getUtxoIndexReq.Tokenname
currentHeight := p.GetHeight()
for _, amount := range getUtxoIndexReq.Amount {
utxos, err := p.getUtxosByTokenAndAmount(tokenName, amount, types.UTXOCacheCount)
for _, amount := range req.GetAmount() {
utxos, err := p.getUtxosByTokenAndAmount(req.GetAssetExec(), req.GetAssetSymbol(), amount, pty.UTXOCacheCount)
if err != nil {
return utxoGlobalIndexResp, err
}
index := len(utxos) - 1
for ; index >= 0; index-- {
if utxos[index].GetHeight()+types.ConfirmedHeight <= currentHeight {
if utxos[index].GetHeight()+pty.ConfirmedHeight <= currentHeight {
break
}
}
mixCount := getUtxoIndexReq.MixCount
mixCount := req.GetMixCount()
totalCnt := int32(index + 1)
if mixCount > totalCnt {
mixCount = totalCnt
......@@ -154,7 +153,7 @@ func (p *privacy) getGlobalUtxoIndex(getUtxoIndexReq *pty.ReqUTXOGlobalIndex) (t
func (p *privacy) ShowAmountsOfUTXO(reqtoken *pty.ReqPrivacyToken) (types.Message, error) {
querydb := p.GetLocalDB()
key := CalcprivacyKeyTokenAmountType(reqtoken.Token)
key := CalcprivacyKeyTokenAmountType(reqtoken.GetAssetExec(), reqtoken.GetAssetSymbol())
replyAmounts := &pty.ReplyPrivacyAmounts{}
value, err := querydb.Get(key)
if err != nil {
......@@ -182,7 +181,7 @@ func (p *privacy) ShowUTXOs4SpecifiedAmount(reqtoken *pty.ReqPrivacyToken) (type
querydb := p.GetLocalDB()
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 {
return &replyUTXOsOfAmount, err
}
......@@ -209,8 +208,7 @@ func (p *privacy) CheckTx(tx *types.Transaction, index int) error {
return types.ErrActionNotSupport
}
privacylog.Debug("PrivacyTrading CheckTx", "txhash", txhashstr, "action type ", action.Ty)
assertExec := action.GetAssertExec()
token := action.GetTokenName()
assertExec, token := action.GetAssetExecSymbol()
if token == "" {
return types.ErrInvalidParam
}
......
......@@ -17,7 +17,7 @@ var (
{
index: 1,
payload: &pty.ReqCreatePrivacyTx{
Type: types.PrivacyTypePublic2Privacy,
ActionType: pty.ActionPublic2Privacy,
Amount: types.Coin,
Pubkeypair: testPubkeyPairs[0],
},
......@@ -61,14 +61,14 @@ func TestPrivacy_Query_ShowAmountsOfUTXO(t *testing.T) {
{
index: 1,
params: &pty.ReqPrivacyToken{
Token: "btc",
AssetSymbol: "btc",
},
expectErr: types.ErrNotFound,
},
{
index: 2,
params: &pty.ReqPrivacyToken{
Token: "bty",
AssetSymbol: "bty",
},
expectReply: &pty.ReplyPrivacyAmounts{
AmountDetail: []*pty.AmountDetail{
......@@ -79,6 +79,8 @@ func TestPrivacy_Query_ShowAmountsOfUTXO(t *testing.T) {
}
for _, tc := range queryCases {
req := tc.params.(*pty.ReqPrivacyToken)
req.AssetExec = "coins"
tc.funcName = "ShowAmountsOfUTXO"
}
testQuery(mock, queryCases, t)
......@@ -99,21 +101,23 @@ func TestPrivacy_Query_ShowUTXOs4SpecifiedAmount(t *testing.T) {
{
index: 1,
params: &pty.ReqPrivacyToken{
Token: "bty",
AssetSymbol: "bty",
},
expectErr: types.ErrNotFound,
},
{
index: 2,
params: &pty.ReqPrivacyToken{
Token: "bty",
Amount: types.Coin,
AssetSymbol: "bty",
Amount: types.Coin,
},
disableReplyCheck: true,
},
}
for _, tc := range queryCases {
req := tc.params.(*pty.ReqPrivacyToken)
req.AssetExec = "coins"
tc.funcName = "ShowUTXOs4SpecifiedAmount"
}
testQuery(mock, queryCases, t)
......@@ -139,9 +143,9 @@ func TestPrivacy_Query_GetUTXOGlobalIndex(t *testing.T) {
{
index: 2,
params: &pty.ReqUTXOGlobalIndex{
Tokenname: "btc",
MixCount: 1,
Amount: []int64{types.Coin},
AssetSymbol: "btc",
MixCount: 1,
Amount: []int64{types.Coin},
},
disableReplyCheck: true,
expectErr: types.ErrNotFound,
......@@ -149,9 +153,9 @@ func TestPrivacy_Query_GetUTXOGlobalIndex(t *testing.T) {
{
index: 3,
params: &pty.ReqUTXOGlobalIndex{
Tokenname: "bty",
MixCount: 1,
Amount: []int64{types.Coin, types.Coin * 2},
AssetSymbol: "bty",
MixCount: 1,
Amount: []int64{types.Coin, types.Coin * 2},
},
disableReplyCheck: true,
expectErr: types.ErrNotFound,
......@@ -159,15 +163,19 @@ func TestPrivacy_Query_GetUTXOGlobalIndex(t *testing.T) {
{
index: 4,
params: &pty.ReqUTXOGlobalIndex{
Tokenname: "bty",
MixCount: 1,
Amount: []int64{types.Coin},
AssetSymbol: "bty",
MixCount: 1,
Amount: []int64{types.Coin},
},
disableReplyCheck: true,
},
}
for _, tc := range queryCases {
req := tc.params.(*pty.ReqUTXOGlobalIndex)
if req.AssetExec == "" {
req.AssetExec = "coins"
}
tc.funcName = "GetUTXOGlobalIndex"
}
testQuery(mock, queryCases, t)
......
......@@ -237,5 +237,5 @@ type walletMock struct {
}
func (w *walletMock) GetBlockHeight() int64 {
return initHeight + types.PrivacyMaturityDegree
return initHeight + pty.UtxoMaturityDegree
}
File mode changed from 100644 to 100755
......@@ -108,8 +108,9 @@ message ResUTXOPubKeys {
}
message ReqPrivacyToken {
string token = 1;
int64 amount = 2;
string assetExec = 1;
string assetSymbol = 2;
int64 amount = 3;
}
message AmountDetail {
......@@ -126,8 +127,9 @@ message replyUTXOsOfAmount {
}
message ReceiptPrivacyOutput {
string token = 1;
repeated keyOutput keyoutput = 2;
string assetExec = 1;
string assetSymbol = 2;
repeated keyOutput keyoutput = 3;
}
//各种amount额度的UTXO在链上的数量
message AmountsOfUTXO {
......@@ -204,8 +206,9 @@ message ReplyPrivacyPkPair {
}
message ReqPrivBal4AddrToken {
string addr = 1;
string token = 2;
string addr = 1;
string token = 2;
string assetExec = 3;
}
message ReplyPrivacyBalance {
......@@ -224,6 +227,7 @@ message PrivacyDBStore {
int64 height = 8;
int32 txindex = 9;
bytes blockhash = 10;
string assetExec = 11;
}
message UTXO {
......@@ -245,9 +249,10 @@ message UTXOHaveTxHashs {
}
message ReqUTXOGlobalIndex {
string tokenname = 1;
int32 mixCount = 2;
repeated int64 amount = 3;
string assetExec = 1;
string assetSymbol = 2;
int32 mixCount = 3;
repeated int64 amount = 4;
}
message UTXOBasic {
......@@ -261,8 +266,6 @@ message UTXOIndex4Amount {
}
message ResUTXOGlobalIndex {
string tokenname = 1;
int32 mixCount = 2;
repeated UTXOIndex4Amount utxoIndex4Amount = 3;
}
......@@ -270,9 +273,10 @@ message FTXOsSTXOsInOneTx {
string tokenname = 1;
string sender = 2;
// FTXO的超期,设定原则与Transaction.expire一致
int64 expire = 3;
string txhash = 4;
repeated UTXO utxos = 5;
int64 expire = 3;
string txhash = 4;
repeated UTXO utxos = 5;
string assetExec = 6;
}
message RealKeyInput {
......@@ -313,11 +317,6 @@ message ReplyCacheTxList {
}
message ReqPrivacyAccount {
string tokenname = 1;
string addr = 2;
}
message ReqPPrivacyAccount {
string addr = 1;
string token = 2;
// 设定显示的数据类型信息
......@@ -325,7 +324,8 @@ message ReqPPrivacyAccount {
// 1: 显示UTXO明细
// 2: 显示FTXO明细
// 3: 全部显示
int32 displaymode = 3;
int32 displaymode = 3;
string assetExec = 4;
}
// 请求隐私账户信息的应答
......@@ -353,6 +353,7 @@ message ReqPrivacyTransactionList {
string from = 5;
string address = 6;
bytes seedtxhash = 7;
string assetExec = 8;
}
message ReqRescanUtxos {
......@@ -402,12 +403,9 @@ message WalletAccountPrivacy {
message ReqCreatePrivacyTx {
string tokenname = 1;
// 构建交易类型
// 1:隐私交易 公开->隐私
// 2:隐私交易 隐私->隐私
// 3:隐私交易 隐私->公开
int32 type = 2;
int64 amount = 3;
string note = 4;
int32 actionType = 2;
int64 amount = 3;
string note = 4;
// 普通交易的发送方
string from = 5;
// 普通交易的接收方
......
......@@ -50,7 +50,7 @@ func (g *channelClient) CreateRawTransaction(ctx context.Context, in *pty.ReqCre
}
// ShowPrivacyAccountInfo display privacy account information for json rpc
func (c *Jrpc) ShowPrivacyAccountInfo(in *pty.ReqPPrivacyAccount, result *json.RawMessage) error {
func (c *Jrpc) ShowPrivacyAccountInfo(in *pty.ReqPrivacyAccount, result *json.RawMessage) error {
reply, err := c.cli.ExecWalletFunc(pty.PrivacyX, "ShowPrivacyAccountInfo", in)
if err != nil {
return err
......
......@@ -72,7 +72,7 @@ func testShowPrivacyKey(t *testing.T, jrpc *jsonclient.JSONClient) error {
}
func testShowPrivacyAccountInfo(t *testing.T, jrpc *jsonclient.JSONClient) error {
params := pty.ReqPPrivacyAccount{
params := pty.ReqPrivacyAccount{
Addr: "1JSRSwp16NvXiTjYBYK9iUQ9wqp3sCxz2p",
Token: types.BTY,
Displaymode: 1,
......@@ -93,7 +93,7 @@ func testShowPrivacyAccountSpend(t *testing.T, jrpc *jsonclient.JSONClient) erro
}
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
params.Execer = pty.PrivacyX
params.FuncName = "ShowAmountsOfUTXO"
......@@ -106,8 +106,9 @@ func testShowAmountsOfUTXO(t *testing.T, jrpc *jsonclient.JSONClient) error {
func testShowUTXOs4SpecifiedAmount(t *testing.T, jrpc *jsonclient.JSONClient) error {
reqPrivacyToken := pty.ReqPrivacyToken{
Token: types.BTY,
Amount: 123456,
AssetExec: "coins",
AssetSymbol: types.BTY,
Amount: 123456,
}
var params rpctypes.Query4Jrpc
params.Execer = pty.PrivacyX
......
......@@ -41,7 +41,7 @@ func TestRPC_Call(t *testing.T) {
assert.NotNil(t, jsonClient)
//调用:
params := pty.ReqPPrivacyAccount{
params := pty.ReqPrivacyAccount{
Addr: "addr",
Token: "token",
Displaymode: 3,
......
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package types
import "github.com/33cn/chain33/types"
const (
// InvalidAction invalid action type
InvalidAction = 0
//action type for privacy
// ActionPublic2Privacy public to privacy action type
ActionPublic2Privacy = iota + 100
// ActionPrivacy2Privacy privacy to privacy action type
ActionPrivacy2Privacy
// ActionPrivacy2Public privacy to public action type
ActionPrivacy2Public
// log for privacy
// TyLogPrivacyFee privacy fee log type
TyLogPrivacyFee = 500
// TyLogPrivacyInput privacy input type
TyLogPrivacyInput = 501
// TyLogPrivacyOutput privacy output type
TyLogPrivacyOutput = 502
)
const (
//SignNameOnetimeED25519 privacy name of crypto
SignNameOnetimeED25519 = "privacy.onetimeed25519"
// SignNameRing signature name ring
SignNameRing = "privacy.RingSignatue"
// OnetimeED25519 one time ED25519
OnetimeED25519 = 4
// RingBaseonED25519 ring raseon ED25519
RingBaseonED25519 = 5
// PrivacyMaxCount max mix utxo cout
PrivacyMaxCount = 16
// PrivacyTxFee privacy tx fee
PrivacyTxFee = types.Coin
)
const (
// utxo缓存数量
UTXOCacheCount = 256
// UtxoMaturityDegree utxo 成熟度
UtxoMaturityDegree = 12
BTYDustThreshold = types.Coin
ConfirmedHeight = 12
SignatureSize = (4 + 33 + 65)
// Size1Kshiftlen tx消息大小1k
Size1Kshiftlen = 10
)
......@@ -14,41 +14,6 @@ import (
// PrivacyX privacy executor name
var PrivacyX = "privacy"
const (
// InvalidAction invalid action type
InvalidAction = 0
//action type for privacy
// ActionPublic2Privacy public to privacy action type
ActionPublic2Privacy = iota + 100
// ActionPrivacy2Privacy privacy to privacy action type
ActionPrivacy2Privacy
// ActionPrivacy2Public privacy to public action type
ActionPrivacy2Public
// log for privacy
// TyLogPrivacyFee privacy fee log type
TyLogPrivacyFee = 500
// TyLogPrivacyInput privacy input type
TyLogPrivacyInput = 501
// TyLogPrivacyOutput privacy output type
TyLogPrivacyOutput = 502
//SignNameOnetimeED25519 privacy name of crypto
SignNameOnetimeED25519 = "privacy.onetimeed25519"
// SignNameRing signature name ring
SignNameRing = "privacy.RingSignatue"
// OnetimeED25519 one time ED25519
OnetimeED25519 = 4
// RingBaseonED25519 ring raseon ED25519
RingBaseonED25519 = 5
// PrivacyMaxCount max mix utxo cout
PrivacyMaxCount = 16
// PrivacyTxFee privacy tx fee
PrivacyTxFee = types.Coin
)
// RescanUtxoFlag
const (
UtxoFlagNoScan int32 = 0
......@@ -116,7 +81,7 @@ func (t *PrivacyType) GetLogMap() map[int64]*types.LogInfo {
return map[int64]*types.LogInfo{
TyLogPrivacyFee: {Ty: reflect.TypeOf(types.ReceiptExecAccountTransfer{}), Name: "LogPrivacyFee"},
TyLogPrivacyInput: {Ty: reflect.TypeOf(PrivacyInput{}), Name: "LogPrivacyInput"},
TyLogPrivacyOutput: {Ty: reflect.TypeOf(PrivacyOutput{}), Name: "LogPrivacyOutput"},
TyLogPrivacyOutput: {Ty: reflect.TypeOf(ReceiptPrivacyOutput{}), Name: "LogPrivacyOutput"},
}
}
......@@ -203,26 +168,14 @@ func (action *PrivacyAction) GetActionName() string {
return "unknow-privacy"
}
// GetTokenName get action token name
func (action *PrivacyAction) GetTokenName() string {
if action.GetTy() == ActionPublic2Privacy && action.GetPublic2Privacy() != nil {
return action.GetPublic2Privacy().GetTokenname()
} else if action.GetTy() == ActionPrivacy2Privacy && action.GetPrivacy2Privacy() != nil {
return action.GetPrivacy2Privacy().GetTokenname()
} else if action.GetTy() == ActionPrivacy2Public && action.GetPrivacy2Public() != nil {
return action.GetPrivacy2Public().GetTokenname()
}
return ""
}
// GetAssertExec get assert exec
func (action *PrivacyAction) GetAssertExec() string {
// GetAssetExecSymbol get assert exec and symbol
func (action *PrivacyAction) GetAssetExecSymbol() (assetExec, assetSymbol string) {
if action.GetTy() == ActionPublic2Privacy && action.GetPublic2Privacy() != nil {
return action.GetPublic2Privacy().GetAssetExec()
return action.GetPublic2Privacy().GetAssetExec(), action.GetPublic2Privacy().GetTokenname()
} else if action.GetTy() == ActionPrivacy2Privacy && action.GetPrivacy2Privacy() != nil {
return action.GetPrivacy2Privacy().GetAssetExec()
return action.GetPrivacy2Privacy().GetAssetExec(), action.GetPrivacy2Privacy().GetTokenname()
} else if action.GetTy() == ActionPrivacy2Public && action.GetPrivacy2Public() != nil {
return action.GetPrivacy2Public().GetAssetExec()
return action.GetPrivacy2Public().GetAssetExec(), action.GetPrivacy2Public().GetTokenname()
}
return ""
return "", ""
}
This diff is collapsed.
......@@ -62,7 +62,7 @@ func (policy *privacyPolicy) On_CreateTransaction(req *privacytypes.ReqCreatePri
return reply, err
}
func (policy *privacyPolicy) On_ShowPrivacyAccountInfo(req *privacytypes.ReqPPrivacyAccount) (types.Message, error) {
func (policy *privacyPolicy) On_ShowPrivacyAccountInfo(req *privacytypes.ReqPrivacyAccount) (types.Message, error) {
reply, err := policy.getPrivacyAccountInfo(req)
if err != nil {
bizlog.Error("getPrivacyAccountInfo", "err", err.Error())
......
......@@ -96,45 +96,37 @@ func calcAddrKey(addr string) []byte {
}
// calcPrivacyUTXOPrefix4Addr 获取指定地址下可用UTXO信息索引的KEY值前缀
func calcPrivacyUTXOPrefix4Addr(token, addr string) []byte {
return []byte(fmt.Sprintf("%s-%s-%s-", AvailUTXOs, token, addr))
func calcPrivacyUTXOPrefix4Addr(assetExec, token, addr string) []byte {
return []byte(fmt.Sprintf("%s-%s-%s-%s-", AvailUTXOs, assetExec, token, addr))
}
// calcFTXOsKeyPrefix 获取指定地址下由于交易未被确认而让交易使用到的UTXO处于冻结状态信息的KEY值前缀
func calcFTXOsKeyPrefix(token, addr string) []byte {
var prefix string
if len(token) > 0 && len(addr) > 0 {
prefix = fmt.Sprintf("%s:%s-%s-", FrozenUTXOs, token, addr)
} else if len(token) > 0 {
prefix = fmt.Sprintf("%s:%s-", FrozenUTXOs, token)
} else {
prefix = fmt.Sprintf("%s:", FrozenUTXOs)
}
return []byte(prefix)
func calcFTXOsKeyPrefix(assetExec, token, addr string) []byte {
return []byte(fmt.Sprintf("%s:%s-%s-%s-", FrozenUTXOs, assetExec, token, addr))
}
// calcSendPrivacyTxKey 计算以指定地址作为发送地址的交易信息索引
// addr为发送地址
// key为通过calcTxKey(heightstr)计算出来的值
func calcSendPrivacyTxKey(tokenname, addr, key string) []byte {
return []byte(fmt.Sprintf("%s:%s-%s-%s", SendPrivacyTx, tokenname, addr, key))
func calcSendPrivacyTxKey(assetExec, tokenname, addr, key string) []byte {
return []byte(fmt.Sprintf("%s:%s-%s-%s-%s", SendPrivacyTx, assetExec, tokenname, addr, key))
}
// calcRecvPrivacyTxKey 计算以指定地址作为接收地址的交易信息索引
// addr为接收地址
// key为通过calcTxKey(heightstr)计算出来的值
func calcRecvPrivacyTxKey(tokenname, addr, key string) []byte {
return []byte(fmt.Sprintf("%s:%s-%s-%s", RecvPrivacyTx, tokenname, addr, key))
func calcRecvPrivacyTxKey(assetExec, tokenname, addr, key string) []byte {
return []byte(fmt.Sprintf("%s:%s-%s-%s-%s", RecvPrivacyTx, assetExec, tokenname, addr, key))
}
// calcUTXOKey4TokenAddr 计算当前地址可用UTXO的Key健值
func calcUTXOKey4TokenAddr(token, addr, txhash string, index int) []byte {
return []byte(fmt.Sprintf("%s-%s-%s-%s-%d", AvailUTXOs, token, addr, txhash, index))
func calcUTXOKey4TokenAddr(assetExec, token, addr, txhash string, index int) []byte {
return []byte(fmt.Sprintf("%s-%s-%s-%s-%s-%d", AvailUTXOs, assetExec, token, addr, txhash, index))
}
// calcKey4FTXOsInTx 交易构建以后,将可用UTXO冻结的健值
func calcKey4FTXOsInTx(token, addr, txhash string) []byte {
return []byte(fmt.Sprintf("%s:%s-%s-%s", FrozenUTXOs, token, addr, txhash))
func calcKey4FTXOsInTx(assetExec, token, addr, txhash string) []byte {
return []byte(fmt.Sprintf("%s:%s-%s-%s-%s", FrozenUTXOs, assetExec, token, addr, txhash))
}
// calcRescanUtxosFlagKey 新账户导入时扫描区块上该地址相关的UTXO信息
......@@ -151,17 +143,17 @@ func calcKey4STXOsInTx(txhash string) []byte {
}
// calcSTXOTokenAddrTxKey 计算当前地址已花费的UTXO
func calcSTXOTokenAddrTxKey(token, addr, txhash string) []byte {
return []byte(fmt.Sprintf("%s-%s-%s-%s", PrivacySTXO, token, addr, txhash))
func calcSTXOTokenAddrTxKey(assetExec, token, addr, txhash string) []byte {
return []byte(fmt.Sprintf("%s-%s-%s-%s-%s", PrivacySTXO, assetExec, token, addr, txhash))
}
func calcSTXOPrefix4Addr(token, addr string) []byte {
return []byte(fmt.Sprintf("%s-%s-%s-", PrivacySTXO, token, addr))
func calcSTXOPrefix4Addr(assetExec, token, addr string) []byte {
return []byte(fmt.Sprintf("%s-%s-%s-%s-", PrivacySTXO, assetExec, token, addr))
}
// calcRevertSendTxKey 交易因为区块回退而将已经花费的UTXO移动到冻结UTXO队列的健值
func calcRevertSendTxKey(tokenname, addr, txhash string) []byte {
return []byte(fmt.Sprintf("%s:%s-%s-%s", RevertSendtx, tokenname, addr, txhash))
func calcRevertSendTxKey(assetExec, tokenname, addr, txhash string) []byte {
return []byte(fmt.Sprintf("%s:%s-%s-%s-%s", RevertSendtx, assetExec, tokenname, addr, txhash))
}
//通过height*100000+index 查询Tx交易信息
......
This diff is collapsed.
......@@ -122,7 +122,7 @@ func (mock *PrivacyMock) CreateUTXOs(sender string, pubkeypair string, amount in
tx := mock.createPublic2PrivacyTx(&ty.ReqCreatePrivacyTx{
AssetExec: "coins",
Tokenname: mock.tokenName,
Type: 1,
ActionType: 1,
Amount: amount,
From: sender,
Pubkeypair: pubkeypair,
......@@ -219,8 +219,8 @@ func (mock *PrivacyMock) createPublic2PrivacyTx(req *ty.ReqCreatePrivacyTx) *typ
To: address.ExecAddress(ty.PrivacyX),
}
cfg := mock.walletOp.GetAPI().GetConfig()
txSize := types.Size(tx) + types.SignatureSize
realFee := int64((txSize+1023)>>types.Size1Kshiftlen) * cfg.GetMinTxFeeRate()
txSize := types.Size(tx) + ty.SignatureSize
realFee := int64((txSize+1023)>>ty.Size1Kshiftlen) * cfg.GetMinTxFeeRate()
tx.Fee = realFee
tx.SetExpire(cfg, time.Hour)
return tx
......
......@@ -171,6 +171,7 @@ func (policy *privacyPolicy) SignTransaction(key crypto.PrivKey, req *types.ReqS
}
type buildStoreWalletTxDetailParam struct {
assetExec string
tokenname string
block *types.BlockDetail
tx *types.Transaction
......
......@@ -355,7 +355,7 @@ func Test_CreateTransaction(t *testing.T) {
req: &ty.ReqCreatePrivacyTx{
AssetExec: "coins",
Tokenname: types.BTY,
Type: 1,
ActionType: ty.ActionPublic2Privacy,
Amount: 100 * types.Coin,
From: testAddrs[0],
Pubkeypair: testPubkeyPairs[0],
......@@ -366,7 +366,7 @@ func Test_CreateTransaction(t *testing.T) {
req: &ty.ReqCreatePrivacyTx{
AssetExec: "coins",
Tokenname: types.BTY,
Type: 2,
ActionType: ty.ActionPrivacy2Privacy,
Amount: 10 * types.Coin,
From: testAddrs[0],
Pubkeypair: testPubkeyPairs[1],
......@@ -377,7 +377,7 @@ func Test_CreateTransaction(t *testing.T) {
req: &ty.ReqCreatePrivacyTx{
AssetExec: "coins",
Tokenname: types.BTY,
Type: 3,
ActionType: ty.ActionPrivacy2Public,
Amount: 10 * types.Coin,
From: testAddrs[0],
Pubkeypair: testPubkeyPairs[0],
......@@ -396,7 +396,7 @@ func Test_PrivacyAccountInfo(t *testing.T) {
mock.init()
testCases := []struct {
req *ty.ReqPPrivacyAccount
req *ty.ReqPrivacyAccount
needReply *ty.ReplyPrivacyAccount
needError error
}{
......@@ -404,7 +404,7 @@ func Test_PrivacyAccountInfo(t *testing.T) {
needError: types.ErrInvalidParam,
},
{
req: &ty.ReqPPrivacyAccount{
req: &ty.ReqPrivacyAccount{
Addr: testAddrs[0],
Token: types.BTY,
Displaymode: 0,
......
This diff is collapsed.
......@@ -73,12 +73,12 @@ func testStore_unsetUTXO(t *testing.T) {
addr := ""
txhash := ""
batch := store.NewBatch(true)
err := store.unsetUTXO(&addr, &txhash, 0, "", batch)
err := store.unsetUTXO("", "", addr, txhash, 0, batch)
assert.NotNil(t, err)
addr = "16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp"
txhash = "TXHASH"
err = store.unsetUTXO(&addr, &txhash, 0, "BTY", batch)
err = store.unsetUTXO("coins", "BTY", addr, txhash, 0, batch)
assert.NoError(t, err)
}
......@@ -174,10 +174,11 @@ func testStore_moveUTXO2FTXO(t *testing.T) {
func testStore_getPrivacyTokenUTXOs(t *testing.T) {
store := createStore(t)
utxos, err := store.getPrivacyTokenUTXOs("", "")
utxos, err := store.getPrivacyTokenUTXOs("", "", "")
assert.Nil(t, err)
assert.NotNil(t, utxos)
assetExec := "coins"
token := "BTY"
addr := "getPrivacyTokenUTXOs"
......@@ -186,12 +187,12 @@ func testStore_getPrivacyTokenUTXOs(t *testing.T) {
bt, err := proto.Marshal(data)
assert.NoError(t, err)
key := fmt.Sprintf("Key%d", n)
err = store.Set(calcUTXOKey4TokenAddr(token, addr, "txhash", n), []byte(key))
err = store.Set(calcUTXOKey4TokenAddr(assetExec, token, addr, "txhash", n), []byte(key))
assert.NoError(t, err)
err = store.Set([]byte(key), bt)
assert.NoError(t, err)
}
utxos, err = store.getPrivacyTokenUTXOs(token, addr)
utxos, err = store.getPrivacyTokenUTXOs(assetExec, token, addr)
assert.NoError(t, err)
assert.Equal(t, 5, len(utxos.utxos))
}
......@@ -209,27 +210,28 @@ func testStore_getWalletPrivacyTxDetails(t *testing.T) {
func testStore_listFrozenUTXOs(t *testing.T) {
store := createStore(t)
assetExec := "coins"
token := "BTY"
addr := "26htvcBNSEA7fZhAdLJphDwQRQJaHpyHTq"
txs, err := store.listFrozenUTXOs("", "")
txs, err := store.listFrozenUTXOs("", "", "")
assert.Nil(t, txs)
assert.NotNil(t, err)
txs, err = store.listFrozenUTXOs(token, addr)
txs, err = store.listFrozenUTXOs(assetExec, token, addr)
assert.Nil(t, txs)
assert.Nil(t, err)
tx := &pt.FTXOsSTXOsInOneTx{Tokenname: "BTY"}
bt, err := proto.Marshal(tx)
assert.NoError(t, err)
err = store.Set(calcKey4FTXOsInTx(token, addr, "TXHASH"), bt)
err = store.Set(calcKey4FTXOsInTx(assetExec, token, addr, "TXHASH"), bt)
assert.NoError(t, err)
txs, err = store.listFrozenUTXOs(token, addr)
txs, err = store.listFrozenUTXOs(assetExec, token, addr)
assert.Nil(t, txs)
assert.NotNil(t, err)
err = store.Set(calcKey4FTXOsInTx(token, addr, "TXHASH"), []byte("DataKey"))
err = store.Set(calcKey4FTXOsInTx(assetExec, token, addr, "TXHASH"), []byte("DataKey"))
assert.NoError(t, err)
err = store.Set([]byte("DataKey"), bt)
assert.NoError(t, err)
txs, err = store.listFrozenUTXOs(token, addr)
txs, err = store.listFrozenUTXOs(assetExec, token, addr)
assert.NoError(t, err)
assert.Equal(t, 1, len(txs))
assert.Equal(t, true, proto.Equal(tx, txs[0]))
......@@ -237,27 +239,29 @@ func testStore_listFrozenUTXOs(t *testing.T) {
func testStore_listAvailableUTXOs(t *testing.T) {
store := createStore(t)
utxos, err := store.listAvailableUTXOs("", "")
utxos, err := store.listAvailableUTXOs("", "", "")
assert.Nil(t, utxos)
assert.Equal(t, err, types.ErrInvalidParam)
addr := "16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTq"
assetExec := "coins"
token := "BTY"
txhash := "123456"
utxo := &pt.PrivacyDBStore{
AssetExec: assetExec,
Tokenname: "BTY",
}
key := calcUTXOKey4TokenAddr(token, addr, txhash, 0)
key := calcUTXOKey4TokenAddr(assetExec, token, addr, txhash, 0)
bt, err := proto.Marshal(utxo)
assert.NoError(t, err)
err = store.Set(key, []byte("AccKey"))
assert.NoError(t, err)
utxos, err = store.listAvailableUTXOs(token, addr)
utxos, err = store.listAvailableUTXOs(assetExec, token, addr)
assert.Nil(t, utxos)
assert.NotNil(t, err)
err = store.Set([]byte("AccKey"), bt)
assert.NoError(t, err)
utxos, err = store.listAvailableUTXOs(token, addr)
utxos, err = store.listAvailableUTXOs(assetExec, token, addr)
assert.NoError(t, err)
assert.Equal(t, 1, len(utxos))
assert.Equal(t, true, proto.Equal(utxo, utxos[0]))
......
......@@ -16,10 +16,11 @@ type addrAndprivacy struct {
// buildInputInfo 构建隐私交易输入的参数结构
type buildInputInfo struct {
tokenname string
sender string
amount int64
mixcount int32
assetExec string
assetSymbol string
sender string
amount int64
mixcount int32
}
// txOutputInfo 存储当前钱包地址下被选中的UTXO信息
......
......@@ -161,12 +161,12 @@ func parseViewSpendPubKeyPair(in string) (viewPubKey, spendPubKey []byte, err er
//1.进行实际转账utxo
//2.进行找零转账utxo
func generateOuts(viewpubTo, spendpubto, viewpubChangeto, spendpubChangeto *[32]byte, transAmount, selectedAmount, fee int64) (*privacytypes.PrivacyOutput, error) {
decomDigit := decomposeAmount2digits(transAmount, types.BTYDustThreshold)
decomDigit := decomposeAmount2digits(transAmount, privacytypes.BTYDustThreshold)
//计算找零
changeAmount := selectedAmount - transAmount - fee
var decomChange []int64
if 0 < changeAmount {
decomChange = decomposeAmount2digits(changeAmount, types.BTYDustThreshold)
decomChange = decomposeAmount2digits(changeAmount, privacytypes.BTYDustThreshold)
}
bizlog.Info("generateOuts", "decompose digit for amount", selectedAmount-fee, "decomDigit", decomDigit)
......
......@@ -9,6 +9,7 @@ import (
"github.com/33cn/chain33/common"
"github.com/33cn/chain33/types"
pty "github.com/33cn/plugin/plugin/dapp/privacy/types"
"github.com/stretchr/testify/require"
)
......@@ -119,7 +120,7 @@ func Test_decomposeAmount2digits(t *testing.T) {
},
{
amount: 62387455827,
dustThreshold: types.BTYDustThreshold,
dustThreshold: pty.BTYDustThreshold,
actual: []int64{87455827, 1e8, 2e8, 2e9, 5e10, 1e10},
},
}
......
......@@ -40,15 +40,14 @@ message PrepareRetrieve {
string defaultAddress = 2;
}
message AssetSymbol {
string exec = 1;
string exec = 1;
string symbol = 2;
}
message PerformRetrieve {
string backupAddress = 1;
string defaultAddress = 2;
string backupAddress = 1;
string defaultAddress = 2;
repeated AssetSymbol assets = 3;
}
......@@ -60,8 +59,8 @@ message CancelRetrieve {
message ReqRetrieveInfo {
string backupAddress = 1;
string defaultAddress = 2;
string assetExec = 3;
string assetSymbol = 4;
string assetExec = 3;
string assetSymbol = 4;
}
message RetrieveQuery {
......
......@@ -44,7 +44,7 @@ func (m *RetrievePara) Reset() { *m = RetrievePara{} }
func (m *RetrievePara) String() string { return proto.CompactTextString(m) }
func (*RetrievePara) ProtoMessage() {}
func (*RetrievePara) Descriptor() ([]byte, []int) {
return fileDescriptor_retrieve_1666ef19b265e4fc, []int{0}
return fileDescriptor_retrieve_468b63ef358476e8, []int{0}
}
func (m *RetrievePara) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RetrievePara.Unmarshal(m, b)
......@@ -112,7 +112,7 @@ func (m *Retrieve) Reset() { *m = Retrieve{} }
func (m *Retrieve) String() string { return proto.CompactTextString(m) }
func (*Retrieve) ProtoMessage() {}
func (*Retrieve) Descriptor() ([]byte, []int) {
return fileDescriptor_retrieve_1666ef19b265e4fc, []int{1}
return fileDescriptor_retrieve_468b63ef358476e8, []int{1}
}
func (m *Retrieve) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Retrieve.Unmarshal(m, b)
......@@ -163,7 +163,7 @@ func (m *RetrieveAction) Reset() { *m = RetrieveAction{} }
func (m *RetrieveAction) String() string { return proto.CompactTextString(m) }
func (*RetrieveAction) ProtoMessage() {}
func (*RetrieveAction) Descriptor() ([]byte, []int) {
return fileDescriptor_retrieve_1666ef19b265e4fc, []int{2}
return fileDescriptor_retrieve_468b63ef358476e8, []int{2}
}
func (m *RetrieveAction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RetrieveAction.Unmarshal(m, b)
......@@ -378,7 +378,7 @@ func (m *BackupRetrieve) Reset() { *m = BackupRetrieve{} }
func (m *BackupRetrieve) String() string { return proto.CompactTextString(m) }
func (*BackupRetrieve) ProtoMessage() {}
func (*BackupRetrieve) Descriptor() ([]byte, []int) {
return fileDescriptor_retrieve_1666ef19b265e4fc, []int{3}
return fileDescriptor_retrieve_468b63ef358476e8, []int{3}
}
func (m *BackupRetrieve) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BackupRetrieve.Unmarshal(m, b)
......@@ -431,7 +431,7 @@ func (m *PrepareRetrieve) Reset() { *m = PrepareRetrieve{} }
func (m *PrepareRetrieve) String() string { return proto.CompactTextString(m) }
func (*PrepareRetrieve) ProtoMessage() {}
func (*PrepareRetrieve) Descriptor() ([]byte, []int) {
return fileDescriptor_retrieve_1666ef19b265e4fc, []int{4}
return fileDescriptor_retrieve_468b63ef358476e8, []int{4}
}
func (m *PrepareRetrieve) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PrepareRetrieve.Unmarshal(m, b)
......@@ -477,7 +477,7 @@ func (m *AssetSymbol) Reset() { *m = AssetSymbol{} }
func (m *AssetSymbol) String() string { return proto.CompactTextString(m) }
func (*AssetSymbol) ProtoMessage() {}
func (*AssetSymbol) Descriptor() ([]byte, []int) {
return fileDescriptor_retrieve_1666ef19b265e4fc, []int{5}
return fileDescriptor_retrieve_468b63ef358476e8, []int{5}
}
func (m *AssetSymbol) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AssetSymbol.Unmarshal(m, b)
......@@ -524,7 +524,7 @@ func (m *PerformRetrieve) Reset() { *m = PerformRetrieve{} }
func (m *PerformRetrieve) String() string { return proto.CompactTextString(m) }
func (*PerformRetrieve) ProtoMessage() {}
func (*PerformRetrieve) Descriptor() ([]byte, []int) {
return fileDescriptor_retrieve_1666ef19b265e4fc, []int{6}
return fileDescriptor_retrieve_468b63ef358476e8, []int{6}
}
func (m *PerformRetrieve) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PerformRetrieve.Unmarshal(m, b)
......@@ -577,7 +577,7 @@ func (m *CancelRetrieve) Reset() { *m = CancelRetrieve{} }
func (m *CancelRetrieve) String() string { return proto.CompactTextString(m) }
func (*CancelRetrieve) ProtoMessage() {}
func (*CancelRetrieve) Descriptor() ([]byte, []int) {
return fileDescriptor_retrieve_1666ef19b265e4fc, []int{7}
return fileDescriptor_retrieve_468b63ef358476e8, []int{7}
}
func (m *CancelRetrieve) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelRetrieve.Unmarshal(m, b)
......@@ -625,7 +625,7 @@ func (m *ReqRetrieveInfo) Reset() { *m = ReqRetrieveInfo{} }
func (m *ReqRetrieveInfo) String() string { return proto.CompactTextString(m) }
func (*ReqRetrieveInfo) ProtoMessage() {}
func (*ReqRetrieveInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_retrieve_1666ef19b265e4fc, []int{8}
return fileDescriptor_retrieve_468b63ef358476e8, []int{8}
}
func (m *ReqRetrieveInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqRetrieveInfo.Unmarshal(m, b)
......@@ -689,7 +689,7 @@ func (m *RetrieveQuery) Reset() { *m = RetrieveQuery{} }
func (m *RetrieveQuery) String() string { return proto.CompactTextString(m) }
func (*RetrieveQuery) ProtoMessage() {}
func (*RetrieveQuery) Descriptor() ([]byte, []int) {
return fileDescriptor_retrieve_1666ef19b265e4fc, []int{9}
return fileDescriptor_retrieve_468b63ef358476e8, []int{9}
}
func (m *RetrieveQuery) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RetrieveQuery.Unmarshal(m, b)
......@@ -935,9 +935,9 @@ var _Retrieve_serviceDesc = grpc.ServiceDesc{
Metadata: "retrieve.proto",
}
func init() { proto.RegisterFile("retrieve.proto", fileDescriptor_retrieve_1666ef19b265e4fc) }
func init() { proto.RegisterFile("retrieve.proto", fileDescriptor_retrieve_468b63ef358476e8) }
var fileDescriptor_retrieve_1666ef19b265e4fc = []byte{
var fileDescriptor_retrieve_468b63ef358476e8 = []byte{
// 552 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xc1, 0x6e, 0xd3, 0x40,
0x10, 0xed, 0xc6, 0x8d, 0xd3, 0x4c, 0xa8, 0x23, 0x16, 0x51, 0x59, 0x15, 0xaa, 0x22, 0x0b, 0xa1,
......
......@@ -3,20 +3,20 @@ package types;
//后面如果有其他数据模型可继续往上面添加
message Storage {
oneof value {
ContentOnlyNotaryStorage contentStorage = 1;
HashOnlyNotaryStorage hashStorage = 2;
LinkNotaryStorage linkStorage = 3;
EncryptNotaryStorage encryptStorage = 4;
ContentOnlyNotaryStorage contentStorage = 1;
HashOnlyNotaryStorage hashStorage = 2;
LinkNotaryStorage linkStorage = 3;
EncryptNotaryStorage encryptStorage = 4;
EncryptShareNotaryStorage encryptShareStorage = 5;
}
}
message StorageAction {
oneof value {
ContentOnlyNotaryStorage contentStorage = 1;
HashOnlyNotaryStorage hashStorage = 2;
LinkNotaryStorage linkStorage = 3;
EncryptNotaryStorage encryptStorage = 4;
ContentOnlyNotaryStorage contentStorage = 1;
HashOnlyNotaryStorage hashStorage = 2;
LinkNotaryStorage linkStorage = 3;
EncryptNotaryStorage encryptStorage = 4;
EncryptShareNotaryStorage encryptShareStorage = 5;
}
int32 ty = 6;
......@@ -24,20 +24,20 @@ message StorageAction {
// 内容存证模型
message ContentOnlyNotaryStorage {
//长度需要小于512k
bytes content = 1;
bytes content = 1;
}
//哈希存证模型,推荐使用sha256哈希,限制256位得摘要值
message HashOnlyNotaryStorage {
//长度固定为32字节
bytes hash = 1;
bytes hash = 1;
}
// 链接存证模型
message LinkNotaryStorage {
//存证内容的链接,可以写入URL,或者其他可用于定位源文件得线索.
bytes link = 1;
bytes link = 1;
//源文件得hash值,推荐使用sha256哈希,限制256位得摘要值
bytes hash = 2;
}
......@@ -45,7 +45,7 @@ message LinkNotaryStorage {
// 隐私存证模型,如果一个文件需要存证,且不公开内容,可以选择将源文件通过对称加密算法加密后上链
message EncryptNotaryStorage {
//存证明文内容的hash值,推荐使用sha256哈希,限制256位得摘要值
bytes contentHash = 1;
bytes contentHash = 1;
//源文件得密文,由加密key及nonce对明文加密得到该值。
bytes encryptContent = 2;
//加密iv,通过AES进行加密时制定随机生成的iv,解密时需要使用该值
......@@ -54,7 +54,7 @@ message EncryptNotaryStorage {
// 隐私存证模型
message EncryptContentOnlyNotaryStorage {
//存证内容的hash值,推荐使用sha256哈希,限制256位得摘要值
// bytes contentHash = 1;
// bytes contentHash = 1;
//源文件得密文。
bytes encryptContent = 1;
//加密iv,通过AES进行加密时制定随机生成的iv,解密时需要使用该值
......@@ -64,7 +64,7 @@ message EncryptContentOnlyNotaryStorage {
// 分享隐私存证模型,需要完备的sdk或者相应的密钥库支持
message EncryptShareNotaryStorage {
//存证明文内容的hash值,推荐使用sha256哈希,限制256位得摘要值
bytes contentHash = 1;
bytes contentHash = 1;
//源文件得密文。
bytes encryptContent = 2;
//密钥的kdf推导路径。密钥tree父节点根据该路径可以推导出私钥key
......@@ -76,9 +76,7 @@ message EncryptShareNotaryStorage {
bytes nonce = 5;
}
service storage {
}
service storage {}
//根据txhash去状态数据库中查询存储内容
message QueryStorage {
string txHash = 1;
......
......@@ -18,7 +18,7 @@ message Ticket {
string minerAddress = 6;
// return wallet
string returnAddress = 7;
//miner Price
// miner Price
int64 price = 9;
}
......@@ -41,9 +41,9 @@ message TicketMiner {
bytes modify = 4;
//挖到区块时公开
bytes privHash = 5;
//VRF计算得到的hash
// VRF计算得到的hash
bytes vrfHash = 6;
//VRF计算得到的proof
// VRF计算得到的proof
bytes vrfProof = 7;
}
......@@ -84,8 +84,8 @@ message TicketGenesis {
}
message TicketClose {
repeated string ticketId = 1;
string minerAddress = 2;
repeated string ticketId = 1;
string minerAddress = 2;
}
message TicketList {
......
......@@ -54,7 +54,7 @@ func (m *Ticket) Reset() { *m = Ticket{} }
func (m *Ticket) String() string { return proto.CompactTextString(m) }
func (*Ticket) ProtoMessage() {}
func (*Ticket) Descriptor() ([]byte, []int) {
return fileDescriptor_ticket_258ffe65b0e990fb, []int{0}
return fileDescriptor_ticket_2306639e9c49ccaa, []int{0}
}
func (m *Ticket) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Ticket.Unmarshal(m, b)
......@@ -156,7 +156,7 @@ func (m *TicketAction) Reset() { *m = TicketAction{} }
func (m *TicketAction) String() string { return proto.CompactTextString(m) }
func (*TicketAction) ProtoMessage() {}
func (*TicketAction) Descriptor() ([]byte, []int) {
return fileDescriptor_ticket_258ffe65b0e990fb, []int{1}
return fileDescriptor_ticket_2306639e9c49ccaa, []int{1}
}
func (m *TicketAction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TicketAction.Unmarshal(m, b)
......@@ -410,7 +410,7 @@ func (m *TicketMiner) Reset() { *m = TicketMiner{} }
func (m *TicketMiner) String() string { return proto.CompactTextString(m) }
func (*TicketMiner) ProtoMessage() {}
func (*TicketMiner) Descriptor() ([]byte, []int) {
return fileDescriptor_ticket_258ffe65b0e990fb, []int{2}
return fileDescriptor_ticket_2306639e9c49ccaa, []int{2}
}
func (m *TicketMiner) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TicketMiner.Unmarshal(m, b)
......@@ -493,7 +493,7 @@ func (m *TicketMinerOld) Reset() { *m = TicketMinerOld{} }
func (m *TicketMinerOld) String() string { return proto.CompactTextString(m) }
func (*TicketMinerOld) ProtoMessage() {}
func (*TicketMinerOld) Descriptor() ([]byte, []int) {
return fileDescriptor_ticket_258ffe65b0e990fb, []int{3}
return fileDescriptor_ticket_2306639e9c49ccaa, []int{3}
}
func (m *TicketMinerOld) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TicketMinerOld.Unmarshal(m, b)
......@@ -553,7 +553,7 @@ func (m *MinerFlag) Reset() { *m = MinerFlag{} }
func (m *MinerFlag) String() string { return proto.CompactTextString(m) }
func (*MinerFlag) ProtoMessage() {}
func (*MinerFlag) Descriptor() ([]byte, []int) {
return fileDescriptor_ticket_258ffe65b0e990fb, []int{4}
return fileDescriptor_ticket_2306639e9c49ccaa, []int{4}
}
func (m *MinerFlag) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MinerFlag.Unmarshal(m, b)
......@@ -599,7 +599,7 @@ func (m *TicketBind) Reset() { *m = TicketBind{} }
func (m *TicketBind) String() string { return proto.CompactTextString(m) }
func (*TicketBind) ProtoMessage() {}
func (*TicketBind) Descriptor() ([]byte, []int) {
return fileDescriptor_ticket_258ffe65b0e990fb, []int{5}
return fileDescriptor_ticket_2306639e9c49ccaa, []int{5}
}
func (m *TicketBind) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TicketBind.Unmarshal(m, b)
......@@ -653,7 +653,7 @@ func (m *TicketOpen) Reset() { *m = TicketOpen{} }
func (m *TicketOpen) String() string { return proto.CompactTextString(m) }
func (*TicketOpen) ProtoMessage() {}
func (*TicketOpen) Descriptor() ([]byte, []int) {
return fileDescriptor_ticket_258ffe65b0e990fb, []int{6}
return fileDescriptor_ticket_2306639e9c49ccaa, []int{6}
}
func (m *TicketOpen) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TicketOpen.Unmarshal(m, b)
......@@ -721,7 +721,7 @@ func (m *TicketGenesis) Reset() { *m = TicketGenesis{} }
func (m *TicketGenesis) String() string { return proto.CompactTextString(m) }
func (*TicketGenesis) ProtoMessage() {}
func (*TicketGenesis) Descriptor() ([]byte, []int) {
return fileDescriptor_ticket_258ffe65b0e990fb, []int{7}
return fileDescriptor_ticket_2306639e9c49ccaa, []int{7}
}
func (m *TicketGenesis) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TicketGenesis.Unmarshal(m, b)
......@@ -774,7 +774,7 @@ func (m *TicketClose) Reset() { *m = TicketClose{} }
func (m *TicketClose) String() string { return proto.CompactTextString(m) }
func (*TicketClose) ProtoMessage() {}
func (*TicketClose) Descriptor() ([]byte, []int) {
return fileDescriptor_ticket_258ffe65b0e990fb, []int{8}
return fileDescriptor_ticket_2306639e9c49ccaa, []int{8}
}
func (m *TicketClose) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TicketClose.Unmarshal(m, b)
......@@ -820,7 +820,7 @@ func (m *TicketList) Reset() { *m = TicketList{} }
func (m *TicketList) String() string { return proto.CompactTextString(m) }
func (*TicketList) ProtoMessage() {}
func (*TicketList) Descriptor() ([]byte, []int) {
return fileDescriptor_ticket_258ffe65b0e990fb, []int{9}
return fileDescriptor_ticket_2306639e9c49ccaa, []int{9}
}
func (m *TicketList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TicketList.Unmarshal(m, b)
......@@ -865,7 +865,7 @@ func (m *TicketInfos) Reset() { *m = TicketInfos{} }
func (m *TicketInfos) String() string { return proto.CompactTextString(m) }
func (*TicketInfos) ProtoMessage() {}
func (*TicketInfos) Descriptor() ([]byte, []int) {
return fileDescriptor_ticket_258ffe65b0e990fb, []int{10}
return fileDescriptor_ticket_2306639e9c49ccaa, []int{10}
}
func (m *TicketInfos) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TicketInfos.Unmarshal(m, b)
......@@ -903,7 +903,7 @@ func (m *ReplyTicketList) Reset() { *m = ReplyTicketList{} }
func (m *ReplyTicketList) String() string { return proto.CompactTextString(m) }
func (*ReplyTicketList) ProtoMessage() {}
func (*ReplyTicketList) Descriptor() ([]byte, []int) {
return fileDescriptor_ticket_258ffe65b0e990fb, []int{11}
return fileDescriptor_ticket_2306639e9c49ccaa, []int{11}
}
func (m *ReplyTicketList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyTicketList.Unmarshal(m, b)
......@@ -942,7 +942,7 @@ func (m *ReplyWalletTickets) Reset() { *m = ReplyWalletTickets{} }
func (m *ReplyWalletTickets) String() string { return proto.CompactTextString(m) }
func (*ReplyWalletTickets) ProtoMessage() {}
func (*ReplyWalletTickets) Descriptor() ([]byte, []int) {
return fileDescriptor_ticket_258ffe65b0e990fb, []int{12}
return fileDescriptor_ticket_2306639e9c49ccaa, []int{12}
}
func (m *ReplyWalletTickets) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyWalletTickets.Unmarshal(m, b)
......@@ -990,7 +990,7 @@ func (m *ReceiptTicket) Reset() { *m = ReceiptTicket{} }
func (m *ReceiptTicket) String() string { return proto.CompactTextString(m) }
func (*ReceiptTicket) ProtoMessage() {}
func (*ReceiptTicket) Descriptor() ([]byte, []int) {
return fileDescriptor_ticket_258ffe65b0e990fb, []int{13}
return fileDescriptor_ticket_2306639e9c49ccaa, []int{13}
}
func (m *ReceiptTicket) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReceiptTicket.Unmarshal(m, b)
......@@ -1051,7 +1051,7 @@ func (m *ReceiptTicketBind) Reset() { *m = ReceiptTicketBind{} }
func (m *ReceiptTicketBind) String() string { return proto.CompactTextString(m) }
func (*ReceiptTicketBind) ProtoMessage() {}
func (*ReceiptTicketBind) Descriptor() ([]byte, []int) {
return fileDescriptor_ticket_258ffe65b0e990fb, []int{14}
return fileDescriptor_ticket_2306639e9c49ccaa, []int{14}
}
func (m *ReceiptTicketBind) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReceiptTicketBind.Unmarshal(m, b)
......@@ -1106,7 +1106,7 @@ func (m *ReqBindMiner) Reset() { *m = ReqBindMiner{} }
func (m *ReqBindMiner) String() string { return proto.CompactTextString(m) }
func (*ReqBindMiner) ProtoMessage() {}
func (*ReqBindMiner) Descriptor() ([]byte, []int) {
return fileDescriptor_ticket_258ffe65b0e990fb, []int{15}
return fileDescriptor_ticket_2306639e9c49ccaa, []int{15}
}
func (m *ReqBindMiner) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqBindMiner.Unmarshal(m, b)
......@@ -1165,7 +1165,7 @@ func (m *ReplyBindMiner) Reset() { *m = ReplyBindMiner{} }
func (m *ReplyBindMiner) String() string { return proto.CompactTextString(m) }
func (*ReplyBindMiner) ProtoMessage() {}
func (*ReplyBindMiner) Descriptor() ([]byte, []int) {
return fileDescriptor_ticket_258ffe65b0e990fb, []int{16}
return fileDescriptor_ticket_2306639e9c49ccaa, []int{16}
}
func (m *ReplyBindMiner) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyBindMiner.Unmarshal(m, b)
......@@ -1358,9 +1358,9 @@ var _Ticket_serviceDesc = grpc.ServiceDesc{
Metadata: "ticket.proto",
}
func init() { proto.RegisterFile("ticket.proto", fileDescriptor_ticket_258ffe65b0e990fb) }
func init() { proto.RegisterFile("ticket.proto", fileDescriptor_ticket_2306639e9c49ccaa) }
var fileDescriptor_ticket_258ffe65b0e990fb = []byte{
var fileDescriptor_ticket_2306639e9c49ccaa = []byte{
// 877 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdd, 0x6e, 0xeb, 0x44,
0x10, 0x8e, 0xed, 0x3a, 0x49, 0xa7, 0x4e, 0xcb, 0x59, 0x0a, 0xb2, 0x22, 0x74, 0x14, 0xad, 0x10,
......
......@@ -73,8 +73,8 @@ message ReceiptToken {
}
message ReceiptTokenAmount {
Token prev = 1;
Token current = 2;
Token prev = 1;
Token current = 2;
}
// local
......
This diff is collapsed.
......@@ -35,7 +35,7 @@ message TradeForSell {
// 资产来源
string assetExec = 9;
// 定价资产
string priceExec = 10;
string priceExec = 10;
string priceSymbol = 11;
}
......@@ -60,7 +60,7 @@ message TradeForBuyLimit {
int64 totalBoardlot = 5;
string assetExec = 6;
// 定价资产
string priceExec = 7;
string priceExec = 7;
string priceSymbol = 8;
}
......@@ -91,11 +91,11 @@ message SellOrder {
int64 stoptime = 9;
bool crowdfund = 10;
//此处使用tx的hash来指定
string sellID = 11;
int32 status = 12;
int64 height = 13;
string assetExec = 14;
string priceExec = 15;
string sellID = 11;
int32 status = 12;
int64 height = 13;
string assetExec = 14;
string priceExec = 15;
string priceSymbol = 16;
}
......@@ -112,8 +112,8 @@ message BuyLimitOrder {
int32 status = 9;
int64 height = 10;
string assetExec = 11;
string priceExec = 12;
string priceSymbol = 13;
string priceExec = 12;
string priceSymbol = 13;
}
// 执行器日志部分
......@@ -131,8 +131,8 @@ message ReceiptBuyBase {
string txHash = 11;
int64 height = 12;
string assetExec = 13;
string priceExec = 14;
string priceSymbol = 15;
string priceExec = 14;
string priceSymbol = 15;
}
message ReceiptSellBase {
......@@ -153,11 +153,11 @@ message ReceiptSellBase {
string sellID = 11;
string status = 12;
// buyid
string buyID = 13;
string txHash = 14;
int64 height = 15;
string assetExec = 16;
string priceExec = 17;
string buyID = 13;
string txHash = 14;
int64 height = 15;
string assetExec = 16;
string priceExec = 17;
string priceSymbol = 18;
}
......@@ -277,8 +277,8 @@ message ReplyTradeOrder {
int64 blockTime = 14;
bool isSellOrder = 15;
string assetExec = 16;
string priceExec = 17;
string priceSymbol = 18;
string priceExec = 17;
string priceSymbol = 18;
}
message ReplyTradeOrders {
......@@ -301,26 +301,26 @@ message ReqBuyToken {
}
message LocalOrder {
string assetSymbol = 1;
string owner = 2;
int64 amountPerBoardlot = 3;
int64 minBoardlot = 4;
int64 pricePerBoardlot = 5;
int64 totalBoardlot = 6;
int64 tradedBoardlot = 7;
string buyID = 8;
int32 status = 9;
string sellID = 10;
repeated string txHash = 11;
int64 height = 12;
string key = 13;
int64 blockTime = 14;
bool isSellOrder = 15;
string assetExec = 16;
string txIndex = 17;
bool isFinished = 18;
string priceExec = 19;
string priceSymbol = 20;
string assetSymbol = 1;
string owner = 2;
int64 amountPerBoardlot = 3;
int64 minBoardlot = 4;
int64 pricePerBoardlot = 5;
int64 totalBoardlot = 6;
int64 tradedBoardlot = 7;
string buyID = 8;
int32 status = 9;
string sellID = 10;
repeated string txHash = 11;
int64 height = 12;
string key = 13;
int64 blockTime = 14;
bool isSellOrder = 15;
string assetExec = 16;
string txIndex = 17;
bool isFinished = 18;
string priceExec = 19;
string priceSymbol = 20;
}
service trade {
......
This diff is collapsed.
......@@ -79,13 +79,13 @@ message UnfreezeTerminate {
// receipt
message ReceiptUnfreeze {
Unfreeze prev = 1;
Unfreeze current = 2;
Unfreeze prev = 1;
Unfreeze current = 2;
}
message LocalUnfreeze {
Unfreeze unfreeze = 1;
string txIndex = 2;
string txIndex = 2;
}
// query
......@@ -95,11 +95,11 @@ message ReplyQueryUnfreezeWithdraw {
}
message ReqUnfreezes {
int32 direction = 1;
int32 count = 2;
string fromKey = 3;
string initiator = 4;
string beneficiary = 5;
int32 direction = 1;
int32 count = 2;
string fromKey = 3;
string initiator = 4;
string beneficiary = 5;
}
message ReplyUnfreeze {
......@@ -124,8 +124,8 @@ message ReplyUnfreeze {
FixAmount fixAmount = 10;
LeftProportion leftProportion = 11;
}
bool terminated = 12;
string key = 13;
bool terminated = 12;
string key = 13;
}
message ReplyUnfreezes {
repeated ReplyUnfreeze unfreeze = 1;
......
......@@ -60,7 +60,7 @@ func (m *Unfreeze) Reset() { *m = Unfreeze{} }
func (m *Unfreeze) String() string { return proto.CompactTextString(m) }
func (*Unfreeze) ProtoMessage() {}
func (*Unfreeze) Descriptor() ([]byte, []int) {
return fileDescriptor_unfreeze_9bb0d634bd1b97d4, []int{0}
return fileDescriptor_unfreeze_d65c23f408fc7d3e, []int{0}
}
func (m *Unfreeze) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Unfreeze.Unmarshal(m, b)
......@@ -274,7 +274,7 @@ func (m *FixAmount) Reset() { *m = FixAmount{} }
func (m *FixAmount) String() string { return proto.CompactTextString(m) }
func (*FixAmount) ProtoMessage() {}
func (*FixAmount) Descriptor() ([]byte, []int) {
return fileDescriptor_unfreeze_9bb0d634bd1b97d4, []int{1}
return fileDescriptor_unfreeze_d65c23f408fc7d3e, []int{1}
}
func (m *FixAmount) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FixAmount.Unmarshal(m, b)
......@@ -321,7 +321,7 @@ func (m *LeftProportion) Reset() { *m = LeftProportion{} }
func (m *LeftProportion) String() string { return proto.CompactTextString(m) }
func (*LeftProportion) ProtoMessage() {}
func (*LeftProportion) Descriptor() ([]byte, []int) {
return fileDescriptor_unfreeze_9bb0d634bd1b97d4, []int{2}
return fileDescriptor_unfreeze_d65c23f408fc7d3e, []int{2}
}
func (m *LeftProportion) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LeftProportion.Unmarshal(m, b)
......@@ -372,7 +372,7 @@ func (m *UnfreezeAction) Reset() { *m = UnfreezeAction{} }
func (m *UnfreezeAction) String() string { return proto.CompactTextString(m) }
func (*UnfreezeAction) ProtoMessage() {}
func (*UnfreezeAction) Descriptor() ([]byte, []int) {
return fileDescriptor_unfreeze_9bb0d634bd1b97d4, []int{3}
return fileDescriptor_unfreeze_d65c23f408fc7d3e, []int{3}
}
func (m *UnfreezeAction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UnfreezeAction.Unmarshal(m, b)
......@@ -563,7 +563,7 @@ func (m *UnfreezeCreate) Reset() { *m = UnfreezeCreate{} }
func (m *UnfreezeCreate) String() string { return proto.CompactTextString(m) }
func (*UnfreezeCreate) ProtoMessage() {}
func (*UnfreezeCreate) Descriptor() ([]byte, []int) {
return fileDescriptor_unfreeze_9bb0d634bd1b97d4, []int{4}
return fileDescriptor_unfreeze_d65c23f408fc7d3e, []int{4}
}
func (m *UnfreezeCreate) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UnfreezeCreate.Unmarshal(m, b)
......@@ -747,7 +747,7 @@ func (m *UnfreezeWithdraw) Reset() { *m = UnfreezeWithdraw{} }
func (m *UnfreezeWithdraw) String() string { return proto.CompactTextString(m) }
func (*UnfreezeWithdraw) ProtoMessage() {}
func (*UnfreezeWithdraw) Descriptor() ([]byte, []int) {
return fileDescriptor_unfreeze_9bb0d634bd1b97d4, []int{5}
return fileDescriptor_unfreeze_d65c23f408fc7d3e, []int{5}
}
func (m *UnfreezeWithdraw) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UnfreezeWithdraw.Unmarshal(m, b)
......@@ -785,7 +785,7 @@ func (m *UnfreezeTerminate) Reset() { *m = UnfreezeTerminate{} }
func (m *UnfreezeTerminate) String() string { return proto.CompactTextString(m) }
func (*UnfreezeTerminate) ProtoMessage() {}
func (*UnfreezeTerminate) Descriptor() ([]byte, []int) {
return fileDescriptor_unfreeze_9bb0d634bd1b97d4, []int{6}
return fileDescriptor_unfreeze_d65c23f408fc7d3e, []int{6}
}
func (m *UnfreezeTerminate) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UnfreezeTerminate.Unmarshal(m, b)
......@@ -825,7 +825,7 @@ func (m *ReceiptUnfreeze) Reset() { *m = ReceiptUnfreeze{} }
func (m *ReceiptUnfreeze) String() string { return proto.CompactTextString(m) }
func (*ReceiptUnfreeze) ProtoMessage() {}
func (*ReceiptUnfreeze) Descriptor() ([]byte, []int) {
return fileDescriptor_unfreeze_9bb0d634bd1b97d4, []int{7}
return fileDescriptor_unfreeze_d65c23f408fc7d3e, []int{7}
}
func (m *ReceiptUnfreeze) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReceiptUnfreeze.Unmarshal(m, b)
......@@ -871,7 +871,7 @@ func (m *LocalUnfreeze) Reset() { *m = LocalUnfreeze{} }
func (m *LocalUnfreeze) String() string { return proto.CompactTextString(m) }
func (*LocalUnfreeze) ProtoMessage() {}
func (*LocalUnfreeze) Descriptor() ([]byte, []int) {
return fileDescriptor_unfreeze_9bb0d634bd1b97d4, []int{8}
return fileDescriptor_unfreeze_d65c23f408fc7d3e, []int{8}
}
func (m *LocalUnfreeze) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LocalUnfreeze.Unmarshal(m, b)
......@@ -918,7 +918,7 @@ func (m *ReplyQueryUnfreezeWithdraw) Reset() { *m = ReplyQueryUnfreezeWi
func (m *ReplyQueryUnfreezeWithdraw) String() string { return proto.CompactTextString(m) }
func (*ReplyQueryUnfreezeWithdraw) ProtoMessage() {}
func (*ReplyQueryUnfreezeWithdraw) Descriptor() ([]byte, []int) {
return fileDescriptor_unfreeze_9bb0d634bd1b97d4, []int{9}
return fileDescriptor_unfreeze_d65c23f408fc7d3e, []int{9}
}
func (m *ReplyQueryUnfreezeWithdraw) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyQueryUnfreezeWithdraw.Unmarshal(m, b)
......@@ -967,7 +967,7 @@ func (m *ReqUnfreezes) Reset() { *m = ReqUnfreezes{} }
func (m *ReqUnfreezes) String() string { return proto.CompactTextString(m) }
func (*ReqUnfreezes) ProtoMessage() {}
func (*ReqUnfreezes) Descriptor() ([]byte, []int) {
return fileDescriptor_unfreeze_9bb0d634bd1b97d4, []int{10}
return fileDescriptor_unfreeze_d65c23f408fc7d3e, []int{10}
}
func (m *ReqUnfreezes) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqUnfreezes.Unmarshal(m, b)
......@@ -1055,7 +1055,7 @@ func (m *ReplyUnfreeze) Reset() { *m = ReplyUnfreeze{} }
func (m *ReplyUnfreeze) String() string { return proto.CompactTextString(m) }
func (*ReplyUnfreeze) ProtoMessage() {}
func (*ReplyUnfreeze) Descriptor() ([]byte, []int) {
return fileDescriptor_unfreeze_9bb0d634bd1b97d4, []int{11}
return fileDescriptor_unfreeze_d65c23f408fc7d3e, []int{11}
}
func (m *ReplyUnfreeze) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyUnfreeze.Unmarshal(m, b)
......@@ -1274,7 +1274,7 @@ func (m *ReplyUnfreezes) Reset() { *m = ReplyUnfreezes{} }
func (m *ReplyUnfreezes) String() string { return proto.CompactTextString(m) }
func (*ReplyUnfreezes) ProtoMessage() {}
func (*ReplyUnfreezes) Descriptor() ([]byte, []int) {
return fileDescriptor_unfreeze_9bb0d634bd1b97d4, []int{12}
return fileDescriptor_unfreeze_d65c23f408fc7d3e, []int{12}
}
func (m *ReplyUnfreezes) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyUnfreezes.Unmarshal(m, b)
......@@ -1422,9 +1422,9 @@ var _Unfreeze_serviceDesc = grpc.ServiceDesc{
Metadata: "unfreeze.proto",
}
func init() { proto.RegisterFile("unfreeze.proto", fileDescriptor_unfreeze_9bb0d634bd1b97d4) }
func init() { proto.RegisterFile("unfreeze.proto", fileDescriptor_unfreeze_d65c23f408fc7d3e) }
var fileDescriptor_unfreeze_9bb0d634bd1b97d4 = []byte{
var fileDescriptor_unfreeze_d65c23f408fc7d3e = []byte{
// 755 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcb, 0x6e, 0x13, 0x4b,
0x10, 0xf5, 0x78, 0x3c, 0x7e, 0x94, 0x63, 0xc7, 0xb7, 0x6f, 0xee, 0x65, 0x14, 0x21, 0x64, 0x06,
......
......@@ -30,9 +30,9 @@ message TendermintCommit {
}
message TendermintBlockInfo {
State State = 2;
Proposal Proposal = 3;
TendermintBlock block = 4;
State State = 2;
Proposal Proposal = 3;
TendermintBlock block = 4;
}
message BlockSize {
......@@ -87,7 +87,6 @@ message State {
bytes AppHash = 12;
}
message TendermintBlockHeader {
string chainID = 1;
int64 height = 2;
......@@ -105,9 +104,9 @@ message TendermintBlockHeader {
}
message TendermintBlock {
TendermintBlockHeader header = 1;
Block data = 2;
TendermintCommit lastCommit = 4;
TendermintBlockHeader header = 1;
Block data = 2;
TendermintCommit lastCommit = 4;
}
message Proposal {
......@@ -132,7 +131,7 @@ message ValidBlockMsg {
int64 height = 1;
int32 round = 2;
bytes blockhash = 3;
bool isCommit = 4;
bool isCommit = 4;
}
message ProposalPOLMsg {
......
This diff is collapsed.
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