Commit c1016c12 authored by liuyuhang's avatar liuyuhang

修改 change提案

parent 83b88f85
...@@ -14,7 +14,6 @@ import ( ...@@ -14,7 +14,6 @@ import (
auty "github.com/33cn/plugin/plugin/dapp/autonomy/types" auty "github.com/33cn/plugin/plugin/dapp/autonomy/types"
"github.com/33cn/chain33/common/address" "github.com/33cn/chain33/common/address"
"syscall"
ticket "github.com/33cn/plugin/plugin/dapp/ticket/executor" ticket "github.com/33cn/plugin/plugin/dapp/ticket/executor"
ticketTy "github.com/33cn/plugin/plugin/dapp/ticket/types" ticketTy "github.com/33cn/plugin/plugin/dapp/ticket/types"
) )
...@@ -464,7 +463,6 @@ func (a *action) getActiveRule() (*auty.RuleConfig, error) { ...@@ -464,7 +463,6 @@ func (a *action) getActiveRule() (*auty.RuleConfig, error) {
return nil, err return nil, err
} }
} else { // 载入系统默认值 } else { // 载入系统默认值
rule.BoardAttendRatio = boardAttendRatio
rule.BoardApproveRatio = boardApproveRatio rule.BoardApproveRatio = boardApproveRatio
rule.PubOpposeRatio = pubOpposeRatio rule.PubOpposeRatio = pubOpposeRatio
rule.ProposalAmount = proposalAmount rule.ProposalAmount = proposalAmount
......
...@@ -29,6 +29,13 @@ func (a *action) propChange(prob *auty.ProposalChange) (*types.Receipt, error) { ...@@ -29,6 +29,13 @@ func (a *action) propChange(prob *auty.ProposalChange) (*types.Receipt, error) {
alog.Error("propChange ", "addr", a.fromaddr, "execaddr", a.execaddr, "getActiveBoard failed", err) alog.Error("propChange ", "addr", a.fromaddr, "execaddr", a.execaddr, "getActiveBoard failed", err)
return nil, err return nil, err
} }
// 检查是否符合提案修改
new, err := a.checkChangeable(act, prob.Changes)
if err != nil {
alog.Error("propChange ", "addr", a.fromaddr, "execaddr", a.execaddr, "checkChangeable failed", err)
return nil, err
}
// 获取当前生效提案规则,并且将不修改的规则补齐 // 获取当前生效提案规则,并且将不修改的规则补齐
rule, err := a.getActiveRule() rule, err := a.getActiveRule()
if err != nil { if err != nil {
...@@ -51,7 +58,8 @@ func (a *action) propChange(prob *auty.ProposalChange) (*types.Receipt, error) { ...@@ -51,7 +58,8 @@ func (a *action) propChange(prob *auty.ProposalChange) (*types.Receipt, error) {
cur := &auty.AutonomyProposalChange{ cur := &auty.AutonomyProposalChange{
PropChange: prob, PropChange: prob,
CurRule: rule, CurRule: rule,
VoteResult: &auty.VoteResult{}, Board: new,
VoteResult: &auty.VoteResult{TotalVotes:int32(len(act.Boards))},
Status: auty.AutonomyStatusProposalChange, Status: auty.AutonomyStatusProposalChange,
Address: a.fromaddr, Address: a.fromaddr,
Height: a.height, Height: a.height,
...@@ -104,9 +112,9 @@ func (a *action) rvkPropChange(rvkProb *auty.RevokeProposalChange) (*types.Recei ...@@ -104,9 +112,9 @@ func (a *action) rvkPropChange(rvkProb *auty.RevokeProposalChange) (*types.Recei
var logs []*types.ReceiptLog var logs []*types.ReceiptLog
var kv []*types.KeyValue var kv []*types.KeyValue
receipt, err := a.coinsAccount.ExecActive(a.fromaddr, a.execaddr, cur.CurChange.ProposalAmount) receipt, err := a.coinsAccount.ExecActive(a.fromaddr, a.execaddr, cur.CurRule.ProposalAmount)
if err != nil { if err != nil {
alog.Error("rvkPropChange ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecActive amount", cur.CurChange.ProposalAmount, "err", err) alog.Error("rvkPropChange ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecActive amount", cur.CurRule.ProposalAmount, "err", err)
return nil, err return nil, err
} }
logs = append(logs, receipt.Logs...) logs = append(logs, receipt.Logs...)
...@@ -160,14 +168,6 @@ func (a *action) votePropChange(voteProb *auty.VoteProposalChange) (*types.Recei ...@@ -160,14 +168,6 @@ func (a *action) votePropChange(voteProb *auty.VoteProposalChange) (*types.Recei
// 更新投票记录 // 更新投票记录
votes.Address = append(votes.Address, a.fromaddr) votes.Address = append(votes.Address, a.fromaddr)
if cur.GetVoteResult().TotalVotes == 0 { //需要统计票数
vtCouts, err := a.getTotalVotes(start)
if err != nil {
return nil, err
}
cur.VoteResult.TotalVotes = vtCouts
}
// 获取可投票数 // 获取可投票数
vtCouts, err := a.getAddressVotes(a.fromaddr, start) vtCouts, err := a.getAddressVotes(a.fromaddr, start)
if err != nil { if err != nil {
...@@ -184,7 +184,7 @@ func (a *action) votePropChange(voteProb *auty.VoteProposalChange) (*types.Recei ...@@ -184,7 +184,7 @@ func (a *action) votePropChange(voteProb *auty.VoteProposalChange) (*types.Recei
// 首次进入投票期,即将提案金转入自治系统地址 // 首次进入投票期,即将提案金转入自治系统地址
if cur.Status == auty.AutonomyStatusProposalChange { if cur.Status == auty.AutonomyStatusProposalChange {
receipt, err := a.coinsAccount.ExecTransferFrozen(cur.Address, autonomyFundAddr, a.execaddr, cur.CurChange.ProposalAmount) receipt, err := a.coinsAccount.ExecTransferFrozen(cur.Address, autonomyFundAddr, a.execaddr, cur.CurRule.ProposalAmount)
if err != nil { if err != nil {
alog.Error("votePropChange ", "addr", cur.Address, "execaddr", a.execaddr, "ExecTransferFrozen amount fail", err) alog.Error("votePropChange ", "addr", cur.Address, "execaddr", a.execaddr, "ExecTransferFrozen amount fail", err)
return nil, err return nil, err
...@@ -194,9 +194,7 @@ func (a *action) votePropChange(voteProb *auty.VoteProposalChange) (*types.Recei ...@@ -194,9 +194,7 @@ func (a *action) votePropChange(voteProb *auty.VoteProposalChange) (*types.Recei
} }
if cur.VoteResult.TotalVotes != 0 && if cur.VoteResult.TotalVotes != 0 &&
cur.VoteResult.ApproveVotes+cur.VoteResult.OpposeVotes != 0 && float32(cur.VoteResult.ApproveVotes)/float32(cur.VoteResult.TotalVotes) > float32(cur.CurRule.BoardApproveRatio)/100.0 {
float32(cur.VoteResult.ApproveVotes+cur.VoteResult.OpposeVotes)/float32(cur.VoteResult.TotalVotes) > float32(pubAttendRatio)/100.0 &&
float32(cur.VoteResult.ApproveVotes)/float32(cur.VoteResult.ApproveVotes+cur.VoteResult.OpposeVotes) > float32(pubApproveRatio)/100.0 {
cur.VoteResult.Pass = true cur.VoteResult.Pass = true
cur.PropChange.RealEndBlockHeight = a.height cur.PropChange.RealEndBlockHeight = a.height
} }
...@@ -211,10 +209,9 @@ func (a *action) votePropChange(voteProb *auty.VoteProposalChange) (*types.Recei ...@@ -211,10 +209,9 @@ func (a *action) votePropChange(voteProb *auty.VoteProposalChange) (*types.Recei
// 更新VotesRecord // 更新VotesRecord
kv = append(kv, &types.KeyValue{Key: votesRecord(voteProb.ProposalID), Value: types.Encode(votes)}) kv = append(kv, &types.KeyValue{Key: votesRecord(voteProb.ProposalID), Value: types.Encode(votes)})
// 更新系统规则 // 更新activeBoard
if cur.VoteResult.Pass { if cur.VoteResult.Pass {
upChange := upgradeChange(cur.CurChange, cur.PropChange.ChangeCfg) kv = append(kv, &types.KeyValue{Key: activeBoardID(), Value: types.Encode(cur.Board)})
kv = append(kv, &types.KeyValue{Key: activeChangeID(), Value: types.Encode(upChange)})
} }
ty := auty.TyLogVotePropChange ty := auty.TyLogVotePropChange
...@@ -246,7 +243,6 @@ func (a *action) tmintPropChange(tmintProb *auty.TerminateProposalChange) (*type ...@@ -246,7 +243,6 @@ func (a *action) tmintPropChange(tmintProb *auty.TerminateProposalChange) (*type
return nil, err return nil, err
} }
start := cur.GetPropChange().StartBlockHeight
end := cur.GetPropChange().EndBlockHeight end := cur.GetPropChange().EndBlockHeight
if a.height < end && !cur.VoteResult.Pass { if a.height < end && !cur.VoteResult.Pass {
err := auty.ErrTerminatePeriod err := auty.ErrTerminatePeriod
...@@ -255,16 +251,8 @@ func (a *action) tmintPropChange(tmintProb *auty.TerminateProposalChange) (*type ...@@ -255,16 +251,8 @@ func (a *action) tmintPropChange(tmintProb *auty.TerminateProposalChange) (*type
return nil, err return nil, err
} }
if cur.GetVoteResult().TotalVotes == 0 { //需要统计票数 if cur.VoteResult.TotalVotes != 0 &&
vtCouts, err := a.getTotalVotes(start) float32(cur.VoteResult.ApproveVotes)/float32(cur.VoteResult.TotalVotes) > float32(cur.CurRule.BoardApproveRatio)/100.0 {
if err != nil {
return nil, err
}
cur.VoteResult.TotalVotes = vtCouts
}
if float32(cur.VoteResult.ApproveVotes+cur.VoteResult.OpposeVotes)/float32(cur.VoteResult.TotalVotes) > float32(pubAttendRatio)/100.0 &&
float32(cur.VoteResult.ApproveVotes)/float32(cur.VoteResult.ApproveVotes+cur.VoteResult.OpposeVotes) > float32(pubApproveRatio)/100.0 {
cur.VoteResult.Pass = true cur.VoteResult.Pass = true
} else { } else {
cur.VoteResult.Pass = false cur.VoteResult.Pass = false
...@@ -276,7 +264,7 @@ func (a *action) tmintPropChange(tmintProb *auty.TerminateProposalChange) (*type ...@@ -276,7 +264,7 @@ func (a *action) tmintPropChange(tmintProb *auty.TerminateProposalChange) (*type
// 未进行投票情况下,符合提案关闭的也需要扣除提案费用 // 未进行投票情况下,符合提案关闭的也需要扣除提案费用
if cur.Status == auty.AutonomyStatusProposalChange { if cur.Status == auty.AutonomyStatusProposalChange {
receipt, err := a.coinsAccount.ExecTransferFrozen(cur.Address, autonomyFundAddr, a.execaddr, cur.CurChange.ProposalAmount) receipt, err := a.coinsAccount.ExecTransferFrozen(cur.Address, autonomyFundAddr, a.execaddr, cur.CurRule.ProposalAmount)
if err != nil { if err != nil {
alog.Error("votePropChange ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecTransferFrozen amount fail", err) alog.Error("votePropChange ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecTransferFrozen amount fail", err)
return nil, err return nil, err
...@@ -292,8 +280,7 @@ func (a *action) tmintPropChange(tmintProb *auty.TerminateProposalChange) (*type ...@@ -292,8 +280,7 @@ func (a *action) tmintPropChange(tmintProb *auty.TerminateProposalChange) (*type
// 更新系统规则 // 更新系统规则
if cur.VoteResult.Pass { if cur.VoteResult.Pass {
upChange := upgradeChange(cur.CurChange, cur.PropChange.ChangeCfg) kv = append(kv, &types.KeyValue{Key: activeBoardID(), Value: types.Encode(cur.Board)})
kv = append(kv, &types.KeyValue{Key: activeChangeID(), Value: types.Encode(upChange)})
} }
receiptLog := getChangeReceiptLog(pre, cur, auty.TyLogTmintPropChange) receiptLog := getChangeReceiptLog(pre, cur, auty.TyLogTmintPropChange)
logs = append(logs, receiptLog) logs = append(logs, receiptLog)
...@@ -314,6 +301,48 @@ func (a *action) getProposalChange(ID string) (*auty.AutonomyProposalChange, err ...@@ -314,6 +301,48 @@ func (a *action) getProposalChange(ID string) (*auty.AutonomyProposalChange, err
return cur, nil return cur, nil
} }
func (a *action) checkChangeable(act *auty.ActiveBoard, change []*auty.Change) (*auty.ActiveBoard, error) {
mpBd := make(map[string]struct{})
mpRbd := make(map[string]struct{})
for _, b := range act.Boards {
mpBd[b] = struct{}{}
}
for _, b := range act.Revboards {
mpRbd[b] = struct{}{}
}
for _, ch := range change {
if ch.Cancel {
if _, ok := mpBd[ch.Addr]; !ok {
return nil, auty.ErrChangeBoardAddr
}
// 将删除的加入对端
delete(mpBd, ch.Addr)
mpRbd[ch.Addr] = struct{}{}
} else {
if _, ok := mpRbd[ch.Addr]; !ok {
return nil, auty.ErrChangeBoardAddr
}
// 将删除的加入对端
delete(mpRbd, ch.Addr)
mpBd[ch.Addr] = struct{}{}
}
}
if len(mpBd) > maxBoards || len(mpBd) < minBoards {
return nil, auty.ErrBoardNumber
}
new := &auty.ActiveBoard{
Amount: act.Amount,
StartHeight: act.StartHeight,
}
for k := range mpBd {
new.Boards = append(new.Boards, k)
}
for k := range mpRbd {
new.Revboards = append(new.Revboards, k)
}
return new, nil
}
// getReceiptLog 根据提案信息获取log // getReceiptLog 根据提案信息获取log
// 状态变化: // 状态变化:
func getChangeReceiptLog(pre, cur *auty.AutonomyProposalChange, ty int32) *types.ReceiptLog { func getChangeReceiptLog(pre, cur *auty.AutonomyProposalChange, ty int32) *types.ReceiptLog {
...@@ -332,14 +361,21 @@ func copyAutonomyProposalChange(cur *auty.AutonomyProposalChange) *auty.Autonomy ...@@ -332,14 +361,21 @@ func copyAutonomyProposalChange(cur *auty.AutonomyProposalChange) *auty.Autonomy
if cur.PropChange != nil { if cur.PropChange != nil {
newPropChange := *cur.GetPropChange() newPropChange := *cur.GetPropChange()
newAut.PropChange = &newPropChange newAut.PropChange = &newPropChange
if cur.PropChange.ChangeCfg != nil { if cur.PropChange.Changes != nil {
cfg := *cur.GetPropChange().GetChangeCfg() chs := cur.GetPropChange().GetChanges()
newAut.PropChange.ChangeCfg = &cfg for _, ch := range chs {
newch := *ch
newAut.PropChange.Changes = append(newAut.PropChange.Changes, &newch)
}
} }
} }
if cur.CurChange != nil { if cur.CurRule != nil {
newChange := *cur.GetCurChange() newChange := *cur.GetCurRule()
newAut.CurChange = &newChange newAut.CurRule = &newChange
}
if cur.Board != nil {
newBoard := *cur.GetBoard()
newAut.Board = &newBoard
} }
if cur.VoteResult != nil { if cur.VoteResult != nil {
newRes := *cur.GetVoteResult() newRes := *cur.GetVoteResult()
...@@ -347,29 +383,3 @@ func copyAutonomyProposalChange(cur *auty.AutonomyProposalChange) *auty.Autonomy ...@@ -347,29 +383,3 @@ func copyAutonomyProposalChange(cur *auty.AutonomyProposalChange) *auty.Autonomy
} }
return &newAut return &newAut
} }
func upgradeChange(cur, modify *auty.ChangeConfig) *auty.ChangeConfig {
if cur == nil || modify == nil {
return nil
}
new := *cur
if modify.BoardAttendRatio > 0 {
new.BoardAttendRatio = modify.BoardAttendRatio
}
if modify.BoardApproveRatio > 0 {
new.BoardApproveRatio = modify.BoardApproveRatio
}
if modify.PubOpposeRatio > 0 {
new.PubOpposeRatio = modify.PubOpposeRatio
}
if modify.ProposalAmount > 0 {
new.ProposalAmount = modify.ProposalAmount
}
if modify.LargeProjectAmount > 0 {
new.LargeProjectAmount = modify.LargeProjectAmount
}
if modify.PublicPeriod > 0 {
new.PublicPeriod = modify.PublicPeriod
}
return &new
}
...@@ -70,3 +70,12 @@ func calcCommentHeight(ID, heightindex string) []byte { ...@@ -70,3 +70,12 @@ func calcCommentHeight(ID, heightindex string) []byte {
key := fmt.Sprintf(localCommentPrefix+"%s-"+"%s", ID, heightindex) key := fmt.Sprintf(localCommentPrefix+"%s-"+"%s", ID, heightindex)
return []byte(key) return []byte(key)
} }
var (
// change
changePrefix = idPrefix + "change" + "-"
)
func propChangeID(txHash string) []byte {
return []byte(fmt.Sprintf("%s%s", changePrefix, txHash))
}
\ No newline at end of file
...@@ -13,7 +13,7 @@ import ( ...@@ -13,7 +13,7 @@ import (
) )
const ( const (
maxBoardPeriodAmount = types.Coin * 10000 * 300 // 每个时期董事会审批最大额度200万 maxBoardPeriodAmount = types.Coin * 10000 * 300 // 每个时期董事会审批最大额度300万
boardPeriod = 17280 * 30 * 1 // 时期为一个月 boardPeriod = 17280 * 30 * 1 // 时期为一个月
) )
...@@ -242,9 +242,7 @@ func (a *action) votePropProject(voteProb *auty.VoteProposalProject) (*types.Rec ...@@ -242,9 +242,7 @@ func (a *action) votePropProject(voteProb *auty.VoteProposalProject) (*types.Rec
} }
if cur.BoardVoteRes.TotalVotes != 0 && if cur.BoardVoteRes.TotalVotes != 0 &&
cur.BoardVoteRes.ApproveVotes+cur.BoardVoteRes.OpposeVotes != 0 && float32(cur.BoardVoteRes.ApproveVotes)/float32(cur.BoardVoteRes.TotalVotes) >= float32(cur.CurRule.BoardApproveRatio)/100.0 {
float32(cur.BoardVoteRes.ApproveVotes+cur.BoardVoteRes.OpposeVotes)/float32(cur.BoardVoteRes.TotalVotes) >= float32(cur.CurRule.BoardAttendRatio)/100.0 &&
float32(cur.BoardVoteRes.ApproveVotes)/float32(cur.BoardVoteRes.ApproveVotes+cur.BoardVoteRes.OpposeVotes) >= float32(cur.CurRule.BoardApproveRatio)/100.0 {
cur.BoardVoteRes.Pass = true cur.BoardVoteRes.Pass = true
cur.PropProject.RealEndBlockHeight = a.height cur.PropProject.RealEndBlockHeight = a.height
} }
...@@ -447,16 +445,14 @@ func (a *action) tmintPropProject(tmintProb *auty.TerminateProposalProject) (*ty ...@@ -447,16 +445,14 @@ func (a *action) tmintPropProject(tmintProb *auty.TerminateProposalProject) (*ty
} }
if cur.BoardVoteRes.TotalVotes != 0 && if cur.BoardVoteRes.TotalVotes != 0 &&
cur.BoardVoteRes.ApproveVotes+cur.BoardVoteRes.OpposeVotes != 0 && float32(cur.BoardVoteRes.ApproveVotes)/float32(cur.BoardVoteRes.TotalVotes) >= float32(cur.CurRule.BoardApproveRatio)/100.0 {
float32(cur.BoardVoteRes.ApproveVotes+cur.BoardVoteRes.OpposeVotes)/float32(cur.BoardVoteRes.TotalVotes) >= float32(cur.CurRule.BoardAttendRatio)/100.0 &&
float32(cur.BoardVoteRes.ApproveVotes)/float32(cur.BoardVoteRes.ApproveVotes+cur.BoardVoteRes.OpposeVotes) >= float32(cur.CurRule.BoardApproveRatio)/100.0 {
cur.BoardVoteRes.Pass = true cur.BoardVoteRes.Pass = true
} else { } else {
cur.BoardVoteRes.Pass = false cur.BoardVoteRes.Pass = false
} }
if cur.PubVote.Publicity { if cur.PubVote.Publicity {
if cur.GetBoardVoteRes().TotalVotes == 0 { //需要统计总票数 if cur.PubVote.TotalVotes == 0 { //需要统计总票数
vtCouts, err := a.getTotalVotes(start) vtCouts, err := a.getTotalVotes(start)
if err != nil { if err != nil {
return nil, err return nil, err
......
...@@ -29,15 +29,14 @@ const ( ...@@ -29,15 +29,14 @@ const (
func (a *action) propRule(prob *auty.ProposalRule) (*types.Receipt, error) { func (a *action) propRule(prob *auty.ProposalRule) (*types.Receipt, error) {
//如果全小于等于0,则说明该提案规则参数不正确 //如果全小于等于0,则说明该提案规则参数不正确
if prob.RuleCfg == nil || prob.RuleCfg.BoardAttendRatio < minBoardAttendRatio && prob.RuleCfg.BoardApproveRatio < minBoardApproveRatio && if prob.RuleCfg == nil || prob.RuleCfg.BoardApproveRatio < minBoardApproveRatio && prob.RuleCfg.PubOpposeRatio <= minPubOpposeRatio &&
prob.RuleCfg.PubOpposeRatio <= minPubOpposeRatio && prob.RuleCfg.ProposalAmount <= 0 && prob.RuleCfg.LargeProjectAmount <= 0 && prob.RuleCfg.ProposalAmount <= 0 && prob.RuleCfg.LargeProjectAmount <= 0 && prob.RuleCfg.PublicPeriod <= 0 {
prob.RuleCfg.PublicPeriod <= 0 {
alog.Error("propRule ", "ProposalRule RuleCfg invaild or have no modify param", prob.RuleCfg) alog.Error("propRule ", "ProposalRule RuleCfg invaild or have no modify param", prob.RuleCfg)
return nil, types.ErrInvalidParam return nil, types.ErrInvalidParam
} }
if prob.RuleCfg.BoardAttendRatio > MaxBoardAttendRatio || prob.RuleCfg.BoardApproveRatio > maxBoardApproveRatio || prob.RuleCfg.PubOpposeRatio > maxPubOpposeRatio { if prob.RuleCfg.BoardApproveRatio > maxBoardApproveRatio || prob.RuleCfg.PubOpposeRatio > maxPubOpposeRatio {
alog.Error("propRule RuleCfg invaild", "BoardAttendRatio", prob.RuleCfg.BoardAttendRatio, "BoardApproveRatio", alog.Error("propRule RuleCfg invaild", "BoardApproveRatio", prob.RuleCfg.BoardApproveRatio,
prob.RuleCfg.BoardApproveRatio, "PubOpposeRatio", prob.RuleCfg.PubOpposeRatio) "PubOpposeRatio", prob.RuleCfg.PubOpposeRatio)
return nil, types.ErrInvalidParam return nil, types.ErrInvalidParam
} }
if prob.StartBlockHeight < a.height || prob.EndBlockHeight < a.height { if prob.StartBlockHeight < a.height || prob.EndBlockHeight < a.height {
...@@ -431,9 +430,6 @@ func upgradeRule(cur, modify *auty.RuleConfig) *auty.RuleConfig { ...@@ -431,9 +430,6 @@ func upgradeRule(cur, modify *auty.RuleConfig) *auty.RuleConfig {
return nil return nil
} }
new := *cur new := *cur
if modify.BoardAttendRatio > 0 {
new.BoardAttendRatio = modify.BoardAttendRatio
}
if modify.BoardApproveRatio > 0 { if modify.BoardApproveRatio > 0 {
new.BoardApproveRatio = modify.BoardApproveRatio new.BoardApproveRatio = modify.BoardApproveRatio
} }
......
...@@ -13,14 +13,16 @@ message AutonomyProposalChange { ...@@ -13,14 +13,16 @@ message AutonomyProposalChange {
ProposalChange propChange = 1; ProposalChange propChange = 1;
// 投票该提案的规则 // 投票该提案的规则
RuleConfig curRule = 2; RuleConfig curRule = 2;
// 投票董事会
ActiveBoard board = 3;
// 全体持票人投票结果 // 全体持票人投票结果
VoteResult voteResult = 3; VoteResult voteResult = 4;
// 状态 // 状态
int32 status = 4; int32 status = 5;
string address = 5; string address = 6;
int64 height = 6; int64 height = 7;
int32 index = 7; int32 index = 8;
string proposalID = 8; string proposalID = 9;
} }
// action // action
......
...@@ -33,18 +33,16 @@ message VotesRecord { ...@@ -33,18 +33,16 @@ message VotesRecord {
} }
message RuleConfig { message RuleConfig {
// 董事会成员参与率,以%为单位,只保留整数部分 // 董事会成员赞成率,以%为单位,只保留整数部分
int32 boardAttendRatio = 1; int32 boardApproveRatio = 1;
// 董事会成员赞成率
int32 boardApproveRatio = 2;
// 全体持票人否决率 // 全体持票人否决率
int32 pubOpposeRatio = 3; int32 pubOpposeRatio = 2;
// 提案金额 // 提案金额
int64 proposalAmount = 4; int64 proposalAmount = 3;
// 重大项目公示金额阈值 // 重大项目公示金额阈值
int64 largeProjectAmount = 5; int64 largeProjectAmount = 4;
// 重大项目公示时间(以区块数为单位) // 重大项目公示时间(以区块数为单位)
int32 publicPeriod = 6; int32 publicPeriod = 5;
} }
message ActiveBoard { message ActiveBoard {
......
...@@ -16,14 +16,16 @@ type AutonomyProposalChange struct { ...@@ -16,14 +16,16 @@ type AutonomyProposalChange struct {
PropChange *ProposalChange `protobuf:"bytes,1,opt,name=propChange" json:"propChange,omitempty"` PropChange *ProposalChange `protobuf:"bytes,1,opt,name=propChange" json:"propChange,omitempty"`
// 投票该提案的规则 // 投票该提案的规则
CurRule *RuleConfig `protobuf:"bytes,2,opt,name=curRule" json:"curRule,omitempty"` CurRule *RuleConfig `protobuf:"bytes,2,opt,name=curRule" json:"curRule,omitempty"`
// 投票董事会
Board *ActiveBoard `protobuf:"bytes,3,opt,name=board" json:"board,omitempty"`
// 全体持票人投票结果 // 全体持票人投票结果
VoteResult *VoteResult `protobuf:"bytes,3,opt,name=voteResult" json:"voteResult,omitempty"` VoteResult *VoteResult `protobuf:"bytes,4,opt,name=voteResult" json:"voteResult,omitempty"`
// 状态 // 状态
Status int32 `protobuf:"varint,4,opt,name=status" json:"status,omitempty"` Status int32 `protobuf:"varint,5,opt,name=status" json:"status,omitempty"`
Address string `protobuf:"bytes,5,opt,name=address" json:"address,omitempty"` Address string `protobuf:"bytes,6,opt,name=address" json:"address,omitempty"`
Height int64 `protobuf:"varint,6,opt,name=height" json:"height,omitempty"` Height int64 `protobuf:"varint,7,opt,name=height" json:"height,omitempty"`
Index int32 `protobuf:"varint,7,opt,name=index" json:"index,omitempty"` Index int32 `protobuf:"varint,8,opt,name=index" json:"index,omitempty"`
ProposalID string `protobuf:"bytes,8,opt,name=proposalID" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,9,opt,name=proposalID" json:"proposalID,omitempty"`
} }
func (m *AutonomyProposalChange) Reset() { *m = AutonomyProposalChange{} } func (m *AutonomyProposalChange) Reset() { *m = AutonomyProposalChange{} }
...@@ -45,6 +47,13 @@ func (m *AutonomyProposalChange) GetCurRule() *RuleConfig { ...@@ -45,6 +47,13 @@ func (m *AutonomyProposalChange) GetCurRule() *RuleConfig {
return nil return nil
} }
func (m *AutonomyProposalChange) GetBoard() *ActiveBoard {
if m != nil {
return m.Board
}
return nil
}
func (m *AutonomyProposalChange) GetVoteResult() *VoteResult { func (m *AutonomyProposalChange) GetVoteResult() *VoteResult {
if m != nil { if m != nil {
return m.VoteResult return m.VoteResult
...@@ -374,41 +383,43 @@ func init() { ...@@ -374,41 +383,43 @@ func init() {
func init() { proto.RegisterFile("change.proto", fileDescriptor2) } func init() { proto.RegisterFile("change.proto", fileDescriptor2) }
var fileDescriptor2 = []byte{ var fileDescriptor2 = []byte{
// 571 bytes of a gzipped FileDescriptorProto // 596 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcf, 0x6f, 0xd3, 0x30, 0x1f, 0x8b, 0x08, 0x00, 0x00, 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0x32, 0x04, 0x49, 0x05, 0x00, 0x00, 0xb2, 0x98, 0x6f, 0x7a, 0xe9, 0x6b, 0xd8, 0x5e, 0x6c, 0x30, 0xf3, 0x5c, 0xff, 0x7a, 0x71, 0xba,
0x19, 0xe7, 0xa1, 0xdd, 0xa6, 0x4f, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x96, 0x4a, 0x21, 0x4d,
0x73, 0x05, 0x00, 0x00,
} }
...@@ -25,6 +25,11 @@ const ( ...@@ -25,6 +25,11 @@ const (
AutonomyActionTransfer AutonomyActionTransfer
AutonomyActionCommentProp AutonomyActionCommentProp
AutonomyActionPropChange
AutonomyActionRvkPropChange
AutonomyActionVotePropChange
AutonomyActionTmintPropChange
//log for autonomy //log for autonomy
TyLogPropBoard = 2101 TyLogPropBoard = 2101
TyLogRvkPropBoard = 2102 TyLogRvkPropBoard = 2102
...@@ -42,7 +47,12 @@ const ( ...@@ -42,7 +47,12 @@ const (
TyLogVotePropRule = 2123 TyLogVotePropRule = 2123
TyLogTmintPropRule = 2124 TyLogTmintPropRule = 2124
TyLogCommentProp = 2131 TyLogCommentProp = 2131
TyLogPropChange = 2141
TyLogRvkPropChange = 2142
TyLogVotePropChange = 2143
TyLogTmintPropChange = 2144
) )
// Board status // Board status
...@@ -70,6 +80,16 @@ const ( ...@@ -70,6 +80,16 @@ const (
AutonomyStatusTmintPropRule AutonomyStatusTmintPropRule
) )
// Change status
const (
AutonomyStatusProposalChange = iota + 1
AutonomyStatusRvkPropChange
AutonomyStatusVotePropChange
AutonomyStatusTmintPropChange
)
const ( const (
// GetProposalBoard 用于在cmd里面的区分不同的查询 // GetProposalBoard 用于在cmd里面的区分不同的查询
GetProposalBoard = "GetProposalBoard" GetProposalBoard = "GetProposalBoard"
...@@ -85,6 +105,8 @@ const ( ...@@ -85,6 +105,8 @@ const (
ListProposalRule = "ListProposalRule" ListProposalRule = "ListProposalRule"
// ListProposalComment 查询多个 // ListProposalComment 查询多个
ListProposalComment = "ListProposalComment" ListProposalComment = "ListProposalComment"
// GetProposalChange 用于在cmd里面的区分不同的查询
GetProposalChange = "GetProposalChange"
) )
//包的名字可以通过配置文件来配置 //包的名字可以通过配置文件来配置
......
...@@ -29,4 +29,8 @@ var ( ...@@ -29,4 +29,8 @@ var (
ErrMinerAddr = errors.New("ErrMinerAddr") ErrMinerAddr = errors.New("ErrMinerAddr")
// ErrBindAddr 无效绑定地址 // ErrBindAddr 无效绑定地址
ErrBindAddr = errors.New("ErrBindAddr") ErrBindAddr = errors.New("ErrBindAddr")
// ErrChangeBoardAddr 无效修改董事会成员地址
ErrChangeBoardAddr = errors.New("ErrChangeBoardAddr")
// ErrBoardNumber 董事会成员数错误
ErrBoardNumber = errors.New("ErrBoardNumber")
) )
...@@ -117,18 +117,16 @@ func (m *VotesRecord) GetAddress() []string { ...@@ -117,18 +117,16 @@ func (m *VotesRecord) GetAddress() []string {
} }
type RuleConfig struct { type RuleConfig struct {
// 董事会成员参与率,以%为单位,只保留整数部分 // 董事会成员赞成率,以%为单位,只保留整数部分
BoardAttendRatio int32 `protobuf:"varint,1,opt,name=boardAttendRatio" json:"boardAttendRatio,omitempty"` BoardApproveRatio int32 `protobuf:"varint,1,opt,name=boardApproveRatio" json:"boardApproveRatio,omitempty"`
// 董事会成员赞成率
BoardApproveRatio int32 `protobuf:"varint,2,opt,name=boardApproveRatio" json:"boardApproveRatio,omitempty"`
// 全体持票人否决率 // 全体持票人否决率
PubOpposeRatio int32 `protobuf:"varint,3,opt,name=pubOpposeRatio" json:"pubOpposeRatio,omitempty"` PubOpposeRatio int32 `protobuf:"varint,2,opt,name=pubOpposeRatio" json:"pubOpposeRatio,omitempty"`
// 提案金额 // 提案金额
ProposalAmount int64 `protobuf:"varint,4,opt,name=proposalAmount" json:"proposalAmount,omitempty"` ProposalAmount int64 `protobuf:"varint,3,opt,name=proposalAmount" json:"proposalAmount,omitempty"`
// 重大项目公示金额阈值 // 重大项目公示金额阈值
LargeProjectAmount int64 `protobuf:"varint,5,opt,name=largeProjectAmount" json:"largeProjectAmount,omitempty"` LargeProjectAmount int64 `protobuf:"varint,4,opt,name=largeProjectAmount" json:"largeProjectAmount,omitempty"`
// 重大项目公示时间(以区块数为单位) // 重大项目公示时间(以区块数为单位)
PublicPeriod int32 `protobuf:"varint,6,opt,name=publicPeriod" json:"publicPeriod,omitempty"` PublicPeriod int32 `protobuf:"varint,5,opt,name=publicPeriod" json:"publicPeriod,omitempty"`
} }
func (m *RuleConfig) Reset() { *m = RuleConfig{} } func (m *RuleConfig) Reset() { *m = RuleConfig{} }
...@@ -136,13 +134,6 @@ func (m *RuleConfig) String() string { return proto.CompactTextString ...@@ -136,13 +134,6 @@ func (m *RuleConfig) String() string { return proto.CompactTextString
func (*RuleConfig) ProtoMessage() {} func (*RuleConfig) ProtoMessage() {}
func (*RuleConfig) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{3} } func (*RuleConfig) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{3} }
func (m *RuleConfig) GetBoardAttendRatio() int32 {
if m != nil {
return m.BoardAttendRatio
}
return 0
}
func (m *RuleConfig) GetBoardApproveRatio() int32 { func (m *RuleConfig) GetBoardApproveRatio() int32 {
if m != nil { if m != nil {
return m.BoardApproveRatio return m.BoardApproveRatio
...@@ -229,28 +220,27 @@ func init() { ...@@ -229,28 +220,27 @@ func init() {
func init() { proto.RegisterFile("lcommon.proto", fileDescriptor3) } func init() { proto.RegisterFile("lcommon.proto", fileDescriptor3) }
var fileDescriptor3 = []byte{ var fileDescriptor3 = []byte{
// 368 bytes of a gzipped FileDescriptorProto // 352 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xb1, 0x6e, 0xdb, 0x30, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xbf, 0x4e, 0xe3, 0x40,
0x10, 0x86, 0x21, 0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3d, 0xc1, 0x72, 0x6f, 0x30, 0x5f, 0x97, 0x64, 0xf6, 0xfa, 0x2e, 0xea, 0x8b, 0xff, 0x30, 0xe1, 0x39, 0xba, 0x45,
0x5b, 0x52, 0x7d, 0xd0, 0x57, 0x3e, 0xbe, 0xf8, 0x01, 0x33, 0x9e, 0x63, 0x58, 0x5a, 0x5f, 0xf9, 0xb4, 0x55, 0x3c, 0x95, 0xd7, 0xfb, 0xb6, 0x35, 0xe0, 0xd6, 0x31, 0x88, 0x7f, 0xa9, 0xbe, 0x78,
0xb3, 0x5a, 0x7d, 0xe8, 0x5b, 0x31, 0xb7, 0x4e, 0xc0, 0xff, 0xa5, 0x42, 0x98, 0x84, 0xc3, 0xf4, 0x5b, 0xc5, 0x13, 0x05, 0x52, 0x9e, 0x1e, 0xb4, 0xd9, 0xbc, 0x74, 0xa6, 0xfd, 0xa8, 0x98, 0xf0,
0x95, 0x3f, 0xa7, 0x23, 0x65, 0xe9, 0x46, 0xd7, 0xbb, 0x87, 0x61, 0xaa, 0x31, 0x2a, 0x66, 0xfc, 0x43, 0xbd, 0xfd, 0x0c, 0x00, 0x00, 0xff, 0xff, 0xaf, 0xca, 0x0f, 0x60, 0xb9, 0x02, 0x00, 0x00,
0xa8, 0xff, 0xbf, 0x06, 0x00, 0x00, 0xff, 0xff, 0xbb, 0xdc, 0x0b, 0x33, 0xe5, 0x02, 0x00, 0x00,
} }
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