diff --git a/internal/pkg/chainsdk/core/chain.go b/internal/pkg/chainsdk/core/chain.go index a8d08fa1..8672d4ae 100644 --- a/internal/pkg/chainsdk/core/chain.go +++ b/internal/pkg/chainsdk/core/chain.go @@ -149,16 +149,6 @@ func (chain *Chain) GetTrxFactory() chaindef.TrxFactoryIface { return chain.trxFactory } -func (chain *Chain) ReqChangeConsensus(producers []string, agrmTickLen, agrmTickCnt, fromBlock, fromEpoch, epoch uint64) (reqId string, nonce uint64, err error) { - chain_log.Debugf("<%s> ReqChangeConsensus called", chain.groupItem.GroupId) - - if chain.Consensus.ConsensusProposer() == nil { - return "", 0, fmt.Errorf("consensus proposer is nil") - } - - return chain.Consensus.ConsensusProposer().ReqChangeConsensus(producers, agrmTickLen, agrmTickCnt, fromBlock, fromEpoch, epoch) -} - // PSConn msg handler func (chain *Chain) HandlePsConnMessage(pkg *quorumpb.Package) error { //chain_log.Debugf("<%s> HandlePsConnMessage called, <%s>", chain.groupItem.GroupId, pkg.Type.String()) @@ -191,14 +181,6 @@ func (chain *Chain) HandlePsConnMessage(pkg *quorumpb.Package) error { } else { err = chain.HandleBftMsgPsConn(bftMsg) } - } else if pkg.Type == quorumpb.PackageType_CC_MSG { - ccMsg := &quorumpb.CCMsg{} - err = proto.Unmarshal(pkg.Data, ccMsg) - if err != nil { - chain_log.Warnf(err.Error()) - } else { - err = chain.HandleCCMsgPsConn(ccMsg) - } } else if pkg.Type == quorumpb.PackageType_BROADCAST_MSG { broadcastMsg := &quorumpb.BroadcastMsg{} err = proto.Unmarshal(pkg.Data, broadcastMsg) @@ -354,15 +336,6 @@ func (chain *Chain) HandleSyncMsgRex(syncMsg *quorumpb.SyncMsg, s network.Stream } return nil } -func (chain *Chain) HandleCCMsgPsConn(msg *quorumpb.CCMsg) error { - //chain_log.Debugf("<%s> HandleChangeConsensusReqPsConn called", chain.groupItem.GroupId) - if chain.Consensus.ConsensusProposer() == nil { - //chain_log.Warningf("<%s> Consensus ConsensusProposer is nil", chain.groupItem.GroupId) - return nil - } - - return chain.Consensus.ConsensusProposer().HandleCCMsg(msg) -} func (chain *Chain) HandleBroadcastMsgPsConn(brd *quorumpb.BroadcastMsg) error { chain_log.Debugf("<%s> HandleGroupBroadcastPsConn called", chain.groupItem.GroupId) @@ -607,22 +580,18 @@ func (chain *Chain) CreateConsensus() error { var user def.User var producer def.Producer - var consensusProposer def.ConsensusProposer - var shouldCreateUser, shouldCreateProducer, shouldCreateConsensusProposer bool + var shouldCreateUser, shouldCreateProducer bool if nodectx.GetNodeCtx().NodeType == nodectx.PRODUCER_NODE { shouldCreateProducer = true shouldCreateUser = false - shouldCreateConsensusProposer = true } else if nodectx.GetNodeCtx().NodeType == nodectx.FULL_NODE { //check if I am owner of the Group if chain.groupItem.UserSignPubkey == chain.groupItem.OwnerPubKey { shouldCreateProducer = true - shouldCreateConsensusProposer = true } else { shouldCreateProducer = false - shouldCreateConsensusProposer = false } shouldCreateUser = true } else { @@ -641,57 +610,12 @@ func (chain *Chain) CreateConsensus() error { user.NewUser(chain.groupItem, chain.nodename, chain) } - if shouldCreateConsensusProposer { - chain_log.Infof("<%s> Create and initial molasses consensusproposer", chain.groupItem.GroupId) - consensusProposer = &consensus.MolassesConsensusProposer{} - consensusProposer.NewConsensusProposer(chain.ChainCtx, chain.groupItem, chain.nodename, chain) - } - - chain.Consensus = consensus.NewMolasses(producer, user, consensusProposer) + chain.Consensus = consensus.NewMolasses(producer, user) chain.Consensus.StartProposeTrx() return nil } -// update change consensus result -func (chain *Chain) ReqConsensusChangeDone(bundle *quorumpb.ChangeConsensusResultBundle) { - chain_log.Debugf("<%s> ReqConsensusChangeDone called", chain.groupItem.GroupId) - - //save change consensus result - nodectx.GetNodeCtx().GetChainStorage().UpdateChangeConsensusResult(chain.groupItem.GroupId, bundle, chain.nodename) - - //stop all consensus tasks - chain.Consensus.ConsensusProposer().StopAllTasks() - - switch bundle.Result { - case quorumpb.ChangeConsensusResult_SUCCESS: - chain_log.Debugf("<%s> ReqChangeConsensus SUCCESSFUL", chain.groupItem.GroupId) - /* - TBD - fix implement later - //stop current propose - chain.Consensus.Producer().StopPropose() - //update producer list - chain.updChainConsensus(trxId, bundle) - chain.Consensus.Producer().StartPropose() - - //owner create the fork block and broadcast to all nodes - if chain.IsOwner() { - trx, err := chain.trxFactory.GetForkTrx("", bundle) - if err != nil { - chain_log.Warningf("<%s> GetChangeConsensusResultTrx failed with err <%s>", chain.groupItem.GroupId, err.Error()) - return - } - - chain_log.Debugf("<%s> ReqChangeConsensus SUCCESSFUL, trx created %x", chain.groupItem.GroupId, trx) - //TBD create fork block and broadcast - } - */ - case quorumpb.ChangeConsensusResult_FAIL: - chain_log.Debug("<%s> ReqChangeConsensus FAIL", chain.groupItem.GroupId) - } -} - func (chain *Chain) IsProducer() bool { _, ok := chain.producerPool[chain.groupItem.UserSignPubkey] return ok @@ -900,60 +824,6 @@ func (chain *Chain) ApplyTrxsProducerNode(trxs []*quorumpb.Trx, nodename string) return nil } -/* -func (chain *Chain) applyConseususTrx(trx *quorumpb.Trx, decodeData []byte, nodename string) error { - chain_log.Debugf("<%s> applyConseususTrx called", chain.groupItem.GroupId) - - //decode change consensus result - resultBundle := &quorumpb.ChangeConsensusResultBundle{} - err := proto.Unmarshal(decodeData, resultBundle) - if err != nil { - return err - } - - //check if change consensus result is valid - if resultBundle.Result != quorumpb.ChangeConsensusResult_SUCCESS { - chain_log.Warningf("<%s> change consensus result is not success, skip", chain.groupItem.GroupId) - return nil - } - - history, err := nodectx.GetNodeCtx().GetChainStorage().GetAllChangeConsensusResult(chain.groupItem.GroupId, nodename) - if err != nil { - return err - } - - shouldAccept := true - for _, item := range history { - if item.Req.ReqId == resultBundle.Req.ReqId { - chain_log.Debugf("<%s> change consensus result with reqId <%s> already exist, skip", chain.groupItem.GroupId, resultBundle.Req.ReqId) - shouldAccept = false - break - } - - if item.Req.Nonce > resultBundle.Req.Nonce { - chain_log.Debugf("<%s> change consensus result with reqId <%d> nonce <%d> is smaller than current nonce <%d>, skip", chain.groupItem.GroupId, resultBundle.Req.ReqId, resultBundle.Req.Nonce, item.Req.Nonce) - shouldAccept = false - break - } - } - - if shouldAccept { - //save change consensus result - nodectx.GetNodeCtx().GetChainStorage().UpdateChangeConsensusResult(chain.groupItem.GroupId, resultBundle, nodename) - //update consensus - chain.updChainConsensus(trx.TrxId, resultBundle) - //stop current propose - if chain.Consensus.Producer() != nil { - chain.Consensus.Producer().StopPropose() - //update producer list - chain.Consensus.Producer().StartPropose() - } - } - - return nil -} -*/ - func (chain *Chain) VerifySign(hash, signature []byte, pubkey string) (bool, error) { //check signature bytespubkey, err := base64.RawURLEncoding.DecodeString(pubkey) diff --git a/internal/pkg/chainsdk/core/group.go b/internal/pkg/chainsdk/core/group.go index 9839975f..1574afd0 100644 --- a/internal/pkg/chainsdk/core/group.go +++ b/internal/pkg/chainsdk/core/group.go @@ -261,10 +261,6 @@ func (grp *Group) JoinGroup(item *quorumpb.GroupItem) error { item.UserSignPubkey, grp.ChainCtx) - //commented by cuicat - //update producer list for ConnMgr just created - //grp.ChainCtx.UpdConnMgrProducer() - //create group consensus grp.ChainCtx.CreateConsensus() @@ -435,46 +431,10 @@ func (grp *Group) GetAppConfigItem(keyName string) (*quorumpb.AppConfigItem, err return nodectx.GetNodeCtx().GetChainStorage().GetAppConfigItem(keyName, grp.Item.GroupId, grp.Nodename) } -func (grp *Group) GetAllChangeConsensusResultBundle() ([]*quorumpb.ChangeConsensusResultBundle, error) { - group_log.Debugf("<%s> GetAllChangeConsensusResultBundle called", grp.Item.GroupId) - return nodectx.GetNodeCtx().GetChainStorage().GetAllChangeConsensusResult(grp.Item.GroupId, grp.Nodename) -} - func (grp *Group) GetCurrentTrxProposeInterval() (uint64, error) { return nodectx.GetNodeCtx().GetChainStorage().GetProducerConsensusConfInterval(grp.Item.GroupId, grp.Nodename) } -func (grp *Group) GetLastChangeConsensusResult(isSuccess bool) (*quorumpb.ChangeConsensusResultBundle, error) { - group_log.Debugf("<%s> GetLastSuccessChangeConsensusResult called", grp.Item.GroupId) - results, err := nodectx.GetNodeCtx().GetChainStorage().GetAllChangeConsensusResult(grp.Item.GroupId, grp.Nodename) - if err != nil { - return nil, err - } - - //if there is only 1 proof and nonce is 0, return it (added by owner when create group) - if len(results) == 1 && results[0].Req.Nonce == 0 { - return results[0], nil - } - - nonce := uint64(0) - last := &quorumpb.ChangeConsensusResultBundle{} - for _, result := range results { - if isSuccess && result.Result != quorumpb.ChangeConsensusResult_SUCCESS { - continue - } - if result.Req.Nonce > nonce { - last = result - nonce = result.Req.Nonce - } - } - return last, nil -} - -func (grp *Group) GetChangeConsensusResultById(id string) (*quorumpb.ChangeConsensusResultBundle, error) { - group_log.Debugf("<%s> GetChangeConsensusResultById called", grp.Item.GroupId) - return nodectx.GetNodeCtx().GetChainStorage().GetChangeConsensusResultByReqId(grp.Item.GroupId, id, grp.Nodename) -} - // send update announce trx func (grp *Group) UpdAnnounce(item *quorumpb.AnnounceItem) (string, error) { group_log.Debugf("<%s> UpdAnnounce called", grp.Item.GroupId) @@ -513,11 +473,6 @@ func (grp *Group) GetInitForkTrx(trxId string, item *quorumpb.ForkItem) (*quorum return grp.ChainCtx.GetTrxFactory().GetForkTrx("", item) } -func (grp *Group) ReqChangeConsensus(producers []string, agrmTickLength, agrmTickCount, fromBlock uint64, fromEpoch uint64, epoch uint64) (string, uint64, error) { - group_log.Debugf("<%s> ReqChangeConsensus called", grp.Item.GroupId) - return grp.ChainCtx.ReqChangeConsensus(producers, agrmTickLength, agrmTickCount, fromBlock, fromEpoch, epoch) -} - func (grp *Group) UpdGroupUser(item *quorumpb.UpdGroupUserItem) (string, error) { group_log.Debugf("<%s> UpdUser called", grp.Item.GroupId) trx, err := grp.ChainCtx.GetTrxFactory().GetUpdGroupUserTrx("", item) diff --git a/internal/pkg/chainsdk/def/chaindataciface.go b/internal/pkg/chainsdk/def/chaindataciface.go index 001c217b..76b3dfeb 100644 --- a/internal/pkg/chainsdk/def/chaindataciface.go +++ b/internal/pkg/chainsdk/def/chaindataciface.go @@ -10,7 +10,6 @@ type ChainDataSyncIface interface { HandleTrxPsConn(trx *quorumpb.Trx) error HandleBlockPsConn(block *quorumpb.Block) error HandleBftMsgPsConn(hb *quorumpb.BftMsg) error - HandleCCMsgPsConn(req *quorumpb.CCMsg) error HandleBroadcastMsgPsConn(c *quorumpb.BroadcastMsg) error HandleSyncMsgRex(syncMsg *quorumpb.SyncMsg, fromstream network.Stream) error StartSync() error diff --git a/internal/pkg/conn/connmgr.go b/internal/pkg/conn/connmgr.go index d8e423af..573d2c1f 100644 --- a/internal/pkg/conn/connmgr.go +++ b/internal/pkg/conn/connmgr.go @@ -336,26 +336,6 @@ func (connMgr *ConnMgr) BroadcastBlock(blk *quorumpb.Block) error { return psconn.Publish(pkgBytes) } -func (connMgr *ConnMgr) BroadcastCCMsg(msg *quorumpb.CCMsg) error { - pkg := &quorumpb.Package{} - - pbBytes, err := proto.Marshal(msg) - if err != nil { - return err - } - - pkg.Type = quorumpb.PackageType_CC_MSG - pkg.Data = pbBytes - - pkgBytes, err := proto.Marshal(pkg) - if err != nil { - return err - } - - psconn := connMgr.getUserConn() - return psconn.Publish(pkgBytes) -} - func (connMgr *ConnMgr) BroadcastBftMsg(msg *quorumpb.BftMsg) error { pkg := &quorumpb.Package{} diff --git a/internal/pkg/storage/chain/chaindb.go b/internal/pkg/storage/chain/chaindb.go index 58f27ae9..1904d4bd 100644 --- a/internal/pkg/storage/chain/chaindb.go +++ b/internal/pkg/storage/chain/chaindb.go @@ -189,49 +189,3 @@ func (cs *Storage) GetGroupConsensusInfo(groupId string, prefix ...string) (info } return info, nil } - -func (cs *Storage) UpdateChangeConsensusResult(groupId string, result *quorumpb.ChangeConsensusResultBundle, prefix ...string) error { - key := s.GetChangeConsensusResultKey(groupId, result.Req.ReqId, prefix...) - chaindb_log.Debugf("UpdateChangeConsensusResult key %s", key) - data, err := proto.Marshal(result) - if err != nil { - return err - } - return cs.dbmgr.Db.Set([]byte(key), data) -} - -func (cs *Storage) GetAllChangeConsensusResult(groupId string, prefix ...string) ([]*quorumpb.ChangeConsensusResultBundle, error) { - var rList []*quorumpb.ChangeConsensusResultBundle - //chaindb_log.Debugf("GetAllChangeConsensusResult called") - - key := s.GetChangeConsensusResultPrefix(groupId, prefix...) - err := cs.dbmgr.Db.PrefixForeach([]byte(key), func(k []byte, v []byte, err error) error { - if err != nil { - return err - } - item := quorumpb.ChangeConsensusResultBundle{} - perr := proto.Unmarshal(v, &item) - if perr != nil { - return perr - } - rList = append(rList, &item) - return nil - }) - - return rList, err -} - -func (cs *Storage) GetChangeConsensusResultByReqId(groupId, reqId string, prefix ...string) (*quorumpb.ChangeConsensusResultBundle, error) { - key := s.GetChangeConsensusResultKey(groupId, reqId, prefix...) - chaindb_log.Debugf("GetChangeConsensusResultByReqId key %s", key) - data, err := cs.dbmgr.Db.Get([]byte(key)) - if err != nil { - return nil, err - } - item := quorumpb.ChangeConsensusResultBundle{} - perr := proto.Unmarshal(data, &item) - if perr != nil { - return nil, perr - } - return &item, nil -} diff --git a/internal/pkg/storage/def/chainstorage.go b/internal/pkg/storage/def/chainstorage.go index 1036f3df..31c13175 100644 --- a/internal/pkg/storage/def/chainstorage.go +++ b/internal/pkg/storage/def/chainstorage.go @@ -30,6 +30,4 @@ type APIHandlerIface interface { GetProducers(groupId string, prefix ...string) ([]*quorumpb.ProducerItem, error) GetUser(groupId, userSignPubkey string, prefix ...string) (*quorumpb.UserItem, error) GetProducer(groupId, producerSignPubkey string, prefix ...string) (*quorumpb.ProducerItem, error) - GetAllChangeConsensusResult(groupId string, prefix ...string) ([]*quorumpb.ChangeConsensusResultBundle, error) - GetChangeConsensusResultByReqId(groupId, reqId string, prefix ...string) (*quorumpb.ChangeConsensusResultBundle, error) } diff --git a/pkg/chainapi/api/consensus.go b/pkg/chainapi/api/consensus.go deleted file mode 100644 index a45fb863..00000000 --- a/pkg/chainapi/api/consensus.go +++ /dev/null @@ -1,79 +0,0 @@ -package api - -import ( - "net/http" - - "github.com/labstack/echo/v4" - rumerrors "github.com/rumsystem/quorum/internal/pkg/errors" - handlers "github.com/rumsystem/quorum/pkg/chainapi/handlers" -) - -// @Tags Management -// @Summary GetConsensusHistory -// @Description Get the list of consensus change proof history of a group -// @Produce json -// @Param group_id path string true "Group Id" -// @Success 200 {array} handlers.GetConsensusHistory -// @Router /api/v1/group/{group_id}/consensus/proof/history [get] -func (h *Handler) GetConsensusHistory(c echo.Context) (err error) { - groupId := c.Param("group_id") - res, err := handlers.GetConsensusHistoryHandler(h.ChainAPIdb, groupId) - if err != nil { - return rumerrors.NewBadRequestError(err) - } - - return c.JSON(http.StatusOK, res) -} - -// @Tags Management -// @Summary GetLatestConsensusChangeResult -// @Description Get the lastest change consensus result of a group -// @Produce json -// @Param group_id path string true "Group Id" -// @Success 200 {array} handlers.ConsensusChangeResultBundle -// @Router /api/v1/group/{group_id}/consensus/proof/last [get] -func (h *Handler) GetLatestConsensusChangeResult(c echo.Context) (err error) { - groupId := c.Param("group_id") - res, err := handlers.GetLatestConsensusChangeResultHandler(h.ChainAPIdb, groupId) - if err != nil { - return rumerrors.NewBadRequestError(err) - } - - return c.JSON(http.StatusOK, res) -} - -// @Tags Management -// @Summary GetConsensusResultByReqId -// @Description Get consensus change proof by req_id -// @Produce json -// @Param group_id path string true "Group Id" -// @Param req_id path string true "Req Id" -// @Success 200 {array} handlers.GetConsensusResultByReqIdResult -// @Router /api/v1/group/{group_id}/consensus/proof/{req_id} [get] -func (h *Handler) GetConsensusResultByReqId(c echo.Context) (err error) { - groupId := c.Param("group_id") - reqId := c.Param("req_id") - res, err := handlers.GetConsensusResultByReqIdHandler(h.ChainAPIdb, groupId, reqId) - if err != nil { - return rumerrors.NewBadRequestError(err) - } - - return c.JSON(http.StatusOK, res) -} - -// @Tags Management -// @Summary GetCurrentConsensus -// @Description Get current consensus info -// @Produce json -// @Param group_id path string true "Group Id" -// @Success 200 {array} handlers.GetCurrentConsensusResult -// @Router /api/v1/group/{group_id}/consensus/ [get] -func (h *Handler) GetCurrentConsensus(c echo.Context) (err error) { - groupId := c.Param("group_id") - res, err := handlers.GetCurrentConsensusHandler(h.ChainAPIdb, groupId) - if err != nil { - return rumerrors.NewBadRequestError(err) - } - - return c.JSON(http.StatusOK, res) -} diff --git a/pkg/chainapi/api/reqconsensuschange.go b/pkg/chainapi/api/reqconsensuschange.go deleted file mode 100644 index a108fc3b..00000000 --- a/pkg/chainapi/api/reqconsensuschange.go +++ /dev/null @@ -1,34 +0,0 @@ -package api - -import ( - "net/http" - - "github.com/labstack/echo/v4" - rumerrors "github.com/rumsystem/quorum/internal/pkg/errors" - "github.com/rumsystem/quorum/internal/pkg/utils" - handlers "github.com/rumsystem/quorum/pkg/chainapi/handlers" -) - -// @Tags Management -// @Summary UpdConsensus -// @Description Update group consensus configuration -// @Accept json -// @Produce json -// @Param data body handlers.ReqConsensusChangeParam true "UpdConsensusParam" -// @Success 200 {object} handlers.ReqConsensusChangeResult -// @Router /api/v1/group/updconsensus [post] -func (h *Handler) ReqConsensusChange(c echo.Context) (err error) { - cc := c.(*utils.CustomContext) - params := new(handlers.ReqConsensusChangeParam) - if err := cc.BindAndValidate(params); err != nil { - return err - } - - res, err := handlers.ReqConsensusChange(h.ChainAPIdb, params) - if err != nil { - return rumerrors.NewBadRequestError(err) - } - - return c.JSON(http.StatusOK, res) - -} diff --git a/pkg/chainapi/api/server.go b/pkg/chainapi/api/server.go index d93f7ef4..3fbcfc0a 100644 --- a/pkg/chainapi/api/server.go +++ b/pkg/chainapi/api/server.go @@ -104,11 +104,6 @@ func StartProducerServer(config StartServerParam, signalch chan os.Signal, h *Ha r.GET("/v1/group/:group_id/announced/producers", h.GetAnnouncedProducers) r.GET("/v1/group/:group_id/seed", h.GetGroupSeedHandler) - r.GET("/v1/group/:group_id/consensus/proof/history", h.GetConsensusHistory) - r.GET("/v1/group/:group_id/consensus/proof/last", h.GetLatestConsensusChangeResult) - r.GET("/v1/group/:group_id/consensus/proof/:req_id", h.GetConsensusResultByReqId) - r.GET("/v1/group/:group_id/consensus/", h.GetCurrentConsensus) - //app api a.POST("/v1/token", apph.CreateToken) a.DELETE("/v1/token", apph.RemoveToken) @@ -169,7 +164,6 @@ func StartFullNodeServer(config StartServerParam, signalch chan os.Signal, h *Ha r.POST("/v1/group/chainconfig", h.MgrChainConfig) r.POST("/v1/group/upduser", h.UpdGroupUser) r.POST("/v1/group/announce", h.Announce) - r.POST("/v1/group/reqconsensuschange", h.ReqConsensusChange) r.GET("/v1/node", h.GetNodeInfo) r.GET("/v1/network", h.GetNetwork(&node.Host, node.Info, nodeopt, ethaddr)) @@ -188,11 +182,6 @@ func StartFullNodeServer(config StartServerParam, signalch chan os.Signal, h *Ha r.GET("/v1/group/:group_id/appconfig/:key", h.GetAppConfigItem) r.GET("/v1/group/:group_id/seed", h.GetGroupSeedHandler) - r.GET("/v1/group/:group_id/consensus/proof/history", h.GetConsensusHistory) - r.GET("/v1/group/:group_id/consensus/proof/last", h.GetLatestConsensusChangeResult) - r.GET("/v1/group/:group_id/consensus/proof/:req_id", h.GetConsensusResultByReqId) - r.GET("/v1/group/:group_id/consensus/", h.GetCurrentConsensus) - //app api a.POST("/v1/token", apph.CreateToken) a.DELETE("/v1/token", apph.RemoveToken) diff --git a/pkg/chainapi/handlers/consensus.go b/pkg/chainapi/handlers/consensus.go deleted file mode 100644 index d6ac72c6..00000000 --- a/pkg/chainapi/handlers/consensus.go +++ /dev/null @@ -1,155 +0,0 @@ -package handlers - -import ( - "fmt" - - chain "github.com/rumsystem/quorum/internal/pkg/chainsdk/core" - "github.com/rumsystem/quorum/internal/pkg/storage/def" - quorumpb "github.com/rumsystem/quorum/pkg/pb" -) - -type GetConsensusHistory struct { - Proofs []*ConsensusChangeResultBundle `json:"proofs"` -} - -func GetConsensusHistoryHandler(chainapidb def.APIHandlerIface, groupId string) (*GetConsensusHistory, error) { - //get consensusbundle from db - if groupId == "" { - return nil, fmt.Errorf("group_id can't be nil") - } - - groupmgr := chain.GetGroupMgr() - if group, ok := groupmgr.Groups[groupId]; ok { - consensusHistory, err := group.GetAllChangeConsensusResultBundle() - if err != nil { - return nil, err - } - - var proofs []*ConsensusChangeResultBundle - - for _, item := range consensusHistory { - proof := &ConsensusChangeResultBundle{ - Result: item.Result.String(), - Req: item.Req, - } - proofs = append(proofs, proof) - } - - result := &GetConsensusHistory{ - Proofs: proofs, - } - return result, nil - } else { - return nil, fmt.Errorf("group <%s> not exist", groupId) - } -} - -type ConsensusChangeResultBundle struct { - Result string `json:"result"` - Req *quorumpb.ChangeConsensusReq `json:"req"` - RepononsedProducers []string `json:"repononsed_producer"` -} - -func GetLatestConsensusChangeResultHandler(chainapidb def.APIHandlerIface, groupId string) (*ConsensusChangeResultBundle, error) { - if groupId == "" { - return nil, fmt.Errorf("group_id can't be nil") - } - - groupmgr := chain.GetGroupMgr() - if group, ok := groupmgr.Groups[groupId]; ok { - latestConsensusResult, err := group.GetLastChangeConsensusResult(false) - if err != nil { - return nil, err - } - - result := &ConsensusChangeResultBundle{ - Result: latestConsensusResult.Result.String(), - Req: latestConsensusResult.Req, - } - - return result, nil - } - return nil, fmt.Errorf("group <%s> not exist", groupId) -} - -type GetConsensusResultByReqIdParam struct { - ReqId string `json:"req_id" validate:"required"` -} - -type GetConsensusResultByReqIdResult struct { - Result string `json:"result"` - Req *quorumpb.ChangeConsensusReq `json:"req"` - Resps []*quorumpb.ChangeConsensusResp `json:"resps"` - ResponsedProducers []string `json:"responsed_producer"` -} - -func GetConsensusResultByReqIdHandler(chainapidb def.APIHandlerIface, groupId string, reqId string) (*GetConsensusResultByReqIdResult, error) { - if groupId == "" { - return nil, fmt.Errorf("group_id can't be nil") - } - - groupmgr := chain.GetGroupMgr() - if group, ok := groupmgr.Groups[groupId]; ok { - consensusResult, err := group.GetChangeConsensusResultById(reqId) - if err != nil { - return nil, err - } - - resunlt := &GetConsensusResultByReqIdResult{ - Result: consensusResult.Result.String(), - Req: consensusResult.Req, - Resps: consensusResult.Resps, - } - return resunlt, nil - } - return nil, fmt.Errorf("group <%s> not exist", groupId) -} - -type GetCurrentConsensusResult struct { - Producers []*quorumpb.ProducerItem `json:"producers"` - TrxEpochInterval uint64 `json:"trx_epoch_interval"` - ProofReqID string `json:"proof_req_id"` - CurrEpoch uint64 `json:"curr_epoch"` - CurrBlockId uint64 `json:"curr_block_id"` - LastUpdate int64 `json:"last_update"` -} - -func GetCurrentConsensusHandler(chainapidb def.APIHandlerIface, groupId string) (*GetCurrentConsensusResult, error) { - if groupId == "" { - return nil, fmt.Errorf("group_id can't be nil") - } - - groupmgr := chain.GetGroupMgr() - if group, ok := groupmgr.Groups[groupId]; ok { - producers, err := group.GetProducers() - if err != nil { - return nil, err - } - - trxEpochInterval, err := group.GetCurrentTrxProposeInterval() - if err != nil { - return nil, err - } - proof, err := group.GetLastChangeConsensusResult(true) - if err != nil { - return nil, err - } - - currEpoch := uint64(0) - if group.IsOwner() || group.IsProducer() { - currEpoch = group.GetCurrentEpoch() - } - - currentBlockId := group.GetCurrentBlockId() - lastUpdate := group.GetLatestUpdate() - - return &GetCurrentConsensusResult{Producers: producers, - TrxEpochInterval: trxEpochInterval, - ProofReqID: proof.Req.ReqId, - CurrEpoch: currEpoch, - CurrBlockId: currentBlockId, - LastUpdate: lastUpdate}, nil - } - - return nil, fmt.Errorf("group <%s> not exist", groupId) -} diff --git a/pkg/chainapi/handlers/reqconsensuschange.go b/pkg/chainapi/handlers/reqconsensuschange.go deleted file mode 100644 index 93198d27..00000000 --- a/pkg/chainapi/handlers/reqconsensuschange.go +++ /dev/null @@ -1,112 +0,0 @@ -package handlers - -import ( - "errors" - "fmt" - "time" - - "github.com/go-playground/validator/v10" - chain "github.com/rumsystem/quorum/internal/pkg/chainsdk/core" - rumerrors "github.com/rumsystem/quorum/internal/pkg/errors" - "github.com/rumsystem/quorum/internal/pkg/storage/def" -) - -type ReqConsensusChangeResult struct { - GroupId string `json:"group_id" validate:"required,uuid4" example:"5ed3f9fe-81e2-450d-9146-7a329aac2b62"` - ReqId string `json:"req_id" validate:"required,uuid4" example:"5ed3f9fe-81e2-450d-9146-7a329aac2b62"` - Nonce uint64 `json:"nonce" validate:"required"` - Producers []string `json:"producers" validate:"required"` - FromBlock uint64 `json:"from_block" validate:"required" example:"100"` - FromEpoch uint64 `json:"from_epoch" validate:"required" example:"100"` - Epoch uint64 `json:"epoch" validate:"required" example:"100"` - StartFrom int64 `json:"start_from"` -} - -type ReqConsensusChangeParam struct { - GroupId string `json:"group_id" validate:"required,uuid4" example:"5ed3f9fe-81e2-450d-9146-7a329aac2b62"` - ProducerPubkey []string `from:"producer_pubkey" json:"producer_pubkey" validate:"required" example:"CAISIQOxCH2yVZPR8t6gVvZapxcIPBwMh9jB80pDLNeuA5s8hQ=="` - FromBlock uint64 `from:"from_block" json:"from_block" validate:"required" example:"1000"` - FromEpoch uint64 `from:"from_epoch" json:"start_from_epoch" validate:"required" example:"100"` - Epoch uint64 `from:"epoch" json:"trx_epoch_tick" validate:"required" example:"100"` - AgreementTickLength uint64 `from:"agreement_tick_length" json:"agreement_tick_length" validate:"required"` - AgreementTickCount uint64 `from:"agreement_tick_count" json:"agreement_tick_count" validate:"required"` - Memo string `from:"memo" json:"memo" example:"comment/remark"` -} - -func ReqConsensusChange(chainapidb def.APIHandlerIface, params *ReqConsensusChangeParam) (*ReqConsensusChangeResult, error) { - validate := validator.New() - - if err := validate.Struct(params); err != nil { - return nil, err - } - - groupmgr := chain.GetGroupMgr() - if group, ok := groupmgr.Groups[params.GroupId]; !ok { - return nil, rumerrors.ErrGroupNotFound - } else if group.Item.OwnerPubKey != group.Item.UserSignPubkey { - return nil, rumerrors.ErrOnlyGroupOwner - } else { - //check len of pubkey list - if len(params.ProducerPubkey) == 0 { - return nil, errors.New("producer pubkey list empty") - } - - //check if pubkeys pubkey list are unique - bundle := make(map[string]bool) - for _, producerPubkey := range params.ProducerPubkey { - if ok := bundle[producerPubkey]; ok { - return nil, fmt.Errorf("producer pubkey should be unique") - } - bundle[producerPubkey] = true - } - - //check if pubkeys are announced - for _, producerPubkey := range params.ProducerPubkey { - if producerPubkey == group.Item.OwnerPubKey { - //skip owner - continue - } - - isAnnounced, err := chainapidb.IsProducerAnnounced(group.GroupId, producerPubkey, group.Nodename) - if err != nil { - return nil, err - } - - if !isAnnounced { - return nil, fmt.Errorf("producer <%s> is not announced", producerPubkey) - } - } - - if params.AgreementTickLength < 1000 { - return nil, errors.New("agreement tick length should be greater than 1000(ms)") - } - - if params.AgreementTickCount < 10 { - return nil, errors.New("agreement tick count should be greater than 10") - } - - //check trx epoch tick length - if params.Epoch < 500 { - return nil, errors.New("trx epoch tick length should be greater than 500(ms)") - } - - reqId, nonce, err := group.ReqChangeConsensus(params.ProducerPubkey, params.AgreementTickLength, params.AgreementTickCount, params.FromBlock, params.FromEpoch, params.Epoch) - - if err != nil { - return nil, err - } - - result := &ReqConsensusChangeResult{ - GroupId: group.Item.GroupId, - ReqId: reqId, - Nonce: nonce, - Producers: params.ProducerPubkey, - FromBlock: params.FromBlock, - FromEpoch: params.FromEpoch, - Epoch: params.Epoch, - StartFrom: time.Now().UnixNano(), - } - - return result, nil - } -} diff --git a/pkg/consensus/def/chainiface.go b/pkg/consensus/def/chainiface.go index 687630f1..7dcef26f 100644 --- a/pkg/consensus/def/chainiface.go +++ b/pkg/consensus/def/chainiface.go @@ -21,5 +21,4 @@ type ChainMolassesIface interface { IsProducer() bool IsOwner() bool VerifySign(hash, signature []byte, pubkey string) (bool, error) - ReqConsensusChangeDone(bundle *quorumpb.ChangeConsensusResultBundle) } diff --git a/pkg/consensus/def/consensus.go b/pkg/consensus/def/consensus.go index 294e482b..02a9f822 100644 --- a/pkg/consensus/def/consensus.go +++ b/pkg/consensus/def/consensus.go @@ -4,10 +4,8 @@ type Consensus interface { Name() string Producer() Producer User() User - ConsensusProposer() ConsensusProposer SetProducer(p Producer) SetUser(u User) - SetConsensusProposer(pp ConsensusProposer) StartProposeTrx() StopProposeTrx() } diff --git a/pkg/consensus/def/consensusproposer.go b/pkg/consensus/def/consensusproposer.go deleted file mode 100644 index aeeb11f2..00000000 --- a/pkg/consensus/def/consensusproposer.go +++ /dev/null @@ -1,14 +0,0 @@ -package def - -import ( - "context" - - quorumpb "github.com/rumsystem/quorum/pkg/pb" -) - -type ConsensusProposer interface { - NewConsensusProposer(ctx context.Context, item *quorumpb.GroupItem, nodename string, iface ChainMolassesIface) - HandleCCMsg(req *quorumpb.CCMsg) error - ReqChangeConsensus(producers []string, agrmTickLen, agrmTickCnt, fromBlock, fromEpoch, epoch uint64) (string, uint64, error) - StopAllTasks() -} diff --git a/pkg/consensus/molasses.go b/pkg/consensus/molasses.go index 589a1666..a5ad56fa 100644 --- a/pkg/consensus/molasses.go +++ b/pkg/consensus/molasses.go @@ -5,14 +5,13 @@ import ( ) type Molasses struct { - name string - producer def.Producer - user def.User - consensusProposer def.ConsensusProposer + name string + producer def.Producer + user def.User } -func NewMolasses(p def.Producer, u def.User, cp def.ConsensusProposer) *Molasses { - return &Molasses{name: "Molasses", producer: p, user: u, consensusProposer: cp} +func NewMolasses(p def.Producer, u def.User) *Molasses { + return &Molasses{name: "Molasses", producer: p, user: u} } func (m *Molasses) Name() string { @@ -27,10 +26,6 @@ func (m *Molasses) User() def.User { return m.user } -func (m *Molasses) ConsensusProposer() def.ConsensusProposer { - return m.consensusProposer -} - func (m *Molasses) SetProducer(p def.Producer) { m.producer = p } @@ -39,10 +34,6 @@ func (m *Molasses) SetUser(u def.User) { m.user = u } -func (m *Molasses) SetConsensusProposer(pp def.ConsensusProposer) { - m.consensusProposer = pp -} - func (m *Molasses) StartProposeTrx() { if m.producer != nil { m.producer.StartPropose() diff --git a/pkg/consensus/molassescp.go b/pkg/consensus/molassescp.go deleted file mode 100644 index 70afb26e..00000000 --- a/pkg/consensus/molassescp.go +++ /dev/null @@ -1,530 +0,0 @@ -package consensus - -import ( - "bytes" - "context" - "fmt" - "sync" - "time" - - guuid "github.com/google/uuid" - "github.com/rumsystem/quorum/internal/pkg/conn" - "github.com/rumsystem/quorum/internal/pkg/logging" - "github.com/rumsystem/quorum/internal/pkg/nodectx" - "github.com/rumsystem/quorum/pkg/consensus/def" - localcrypto "github.com/rumsystem/quorum/pkg/crypto" - quorumpb "github.com/rumsystem/quorum/pkg/pb" - "google.golang.org/protobuf/proto" -) - -var molacp_log = logging.Logger("cp") - -type ConsensusProposeTask struct { - Req *quorumpb.ChangeConsensusReq - ReqBytes []byte - ctx context.Context - cancel context.CancelFunc -} - -type PCBftTask struct { - bft *PCBft - chBftDone chan *quorumpb.ChangeConsensusResultBundle - Proof *quorumpb.ChangeConsensusProof - ctx context.Context - cancel context.CancelFunc -} - -type MolassesConsensusProposer struct { - grpItem *quorumpb.GroupItem - groupId string - nodename string - cIface def.ChainMolassesIface - chainCtx context.Context - - chProposeTask chan *ConsensusProposeTask - chBftTask chan *PCBftTask - - currCpTask *ConsensusProposeTask - currBftTask *PCBftTask - - lock sync.Mutex -} - -func (cp *MolassesConsensusProposer) NewConsensusProposer(ctx context.Context, item *quorumpb.GroupItem, nodename string, iface def.ChainMolassesIface) { - molacp_log.Debugf("<%s> NewProducerProposer called", item.GroupId) - cp.grpItem = item - cp.groupId = item.GroupId - cp.nodename = nodename - cp.cIface = iface - cp.chainCtx = ctx - - cp.chProposeTask = make(chan *ConsensusProposeTask, 1) - cp.chBftTask = make(chan *PCBftTask, 1) - - go cp.ProposeWorker(ctx, cp.chProposeTask) - go cp.BftWorker(ctx, cp.chBftTask) - - cp.currCpTask = nil - cp.currBftTask = nil -} - -func (cp *MolassesConsensusProposer) ProposeWorker(chainCtx context.Context, chProposeTask <-chan *ConsensusProposeTask) { - for { - select { - case <-chainCtx.Done(): - molacp_log.Debugf("<%s> ProposerWorker exit", cp.groupId) - return - case task, beforeChClosed := <-chProposeTask: - if chainCtx.Err() != nil { - molacp_log.Debugf("<%s> ProposerWorker: chainCtx canceled, return", cp.groupId) - return - } - - if !beforeChClosed { - molacp_log.Debugf("<%s> ProposerWorker: channel closed, return", cp.groupId) - return - } - - var retryCnt uint64 = 0 - isCanceled := false - - RETRY: - for retryCnt < task.Req.AgreementTickCount { - reqMsg := &quorumpb.ChangeConsensusReqMsg{ - Req: task.Req, - ReqChangeConsensusRetryCnt: retryCnt, - } - - reqMsgBytes, err := proto.Marshal(reqMsg) - if err != nil { - molacp_log.Errorf("<%s> ProposerWorker: proto.Marshal failed, err <%v>", cp.groupId, err) - break RETRY - } - - ccMsg := &quorumpb.CCMsg{ - Type: quorumpb.CCMsgType_CHANGE_CONSENSUS_REQ, - Data: reqMsgBytes, - } - - molacp_log.Debugf("<%s> change consensus RETRY <%d> with reqId <%s>", cp.groupId, retryCnt, task.Req.ReqId) - connMgr, err := conn.GetConn().GetConnMgr(cp.groupId) - if err != nil { - molacp_log.Errorf("<%s> ProposerWorker: GetConnMgr failed, err <%v>", cp.groupId, err) - break RETRY - } - connMgr.BroadcastCCMsg(ccMsg) - select { - case <-task.ctx.Done(): - molacp_log.Debugf("<%s> ProposerWorker: taskCtx done", cp.groupId) - isCanceled = true - break RETRY - case <-time.After(time.Duration(task.Req.AgreementTickLenInMs) * time.Millisecond): - molacp_log.Debugf("<%s> change consensus ROUND <%d> timeout", cp.groupId, retryCnt) - retryCnt += 1 - } - } - - if isCanceled { - molacp_log.Debugf("<%s> ProposerWorker: taskCtx canceled", cp.groupId) - } else { - //if goes here, means no consensus reached, notify chain - molacp_log.Debugf("<%s> ProposerWorker: req consensus failed, notify chain", cp.groupId) - resultBundle := &quorumpb.ChangeConsensusResultBundle{ - Result: quorumpb.ChangeConsensusResult_FAIL, - Req: task.Req, - Resps: nil, - } - cp.cIface.ReqConsensusChangeDone(resultBundle) - } - - molacp_log.Debugf("<%s> ProposerWorker: task done", cp.groupId) - } - } -} - -func (cp *MolassesConsensusProposer) BftWorker(chainCtx context.Context, chBftTask <-chan *PCBftTask) { - for { - select { - case <-chainCtx.Done(): - molacp_log.Debugf("<%s> BftWorker exit", cp.groupId) - return - case task, beforeChClosed := <-chBftTask: - //handle it - if chainCtx.Err() != nil { - molacp_log.Debugf("<%s> BftWorker: chainCtx canceled, return", cp.groupId) - return - } - - if !beforeChClosed { - molacp_log.Debugf("<%s> BftWorker: channel closed, return", cp.groupId) - return - } - - molacp_log.Debugf("<%s> BftWorker: start bft", cp.groupId) - err := task.bft.Propose() - - isCanceled := false - select { - case <-task.ctx.Done(): - molacp_log.Debugf("<%s> BftWorker, taskCtx done, quit task", cp.groupId) - isCanceled = true - case result := <-task.chBftDone: - molacp_log.Debugf("<%s> HandleCCReq bft done with result", cp.groupId) - if cp.currCpTask != nil { - cp.cIface.ReqConsensusChangeDone(result) - } else { - cp.cIface.ReqConsensusChangeDone(result) - } - } - - if err != nil { - molacp_log.Errorf("<%s> BftWorker: bftTask failed, err <%s>", cp.groupId, err.Error()) - } else { - if isCanceled { - molacp_log.Debugf("<%s> BftWorker: bftTask done (canceled)", cp.groupId) - } else { - molacp_log.Debugf("<%s> BftWorker: bftTask done", cp.groupId) - } - } - } - } -} - -func (cp *MolassesConsensusProposer) ReqChangeConsensus(producers []string, agrmTickLen, agrmTickCnt, fromBlock, fromEpoch, epoch uint64) (string, uint64, error) { - molacp_log.Debugf("<%s> StartChangeConsensus called", cp.groupId) - - cp.lock.Lock() - defer cp.lock.Unlock() - - cpTask, err := cp.createProposeTask(cp.chainCtx, producers, agrmTickLen, agrmTickCnt, fromBlock, fromEpoch, epoch) - if err != nil { - molacp_log.Errorf("<%s> createProposeTask failed", cp.groupId) - return "", 0, err - } - - if cp.currCpTask != nil { - cp.currCpTask.cancel() - } - - cp.chProposeTask <- cpTask - cp.currCpTask = cpTask - - return cpTask.Req.ReqId, cpTask.Req.Nonce, nil -} - -func (cp *MolassesConsensusProposer) StopAllTasks() { - molacp_log.Debugf("<%s> StopAllTasks called", cp.groupId) - - cp.lock.Lock() - defer cp.lock.Unlock() - - if cp.currBftTask != nil { - cp.currBftTask.cancel() - } - - if cp.currCpTask != nil { - cp.currCpTask.cancel() - } - - cp.currBftTask = nil - cp.currCpTask = nil - - molacp_log.Debugf("<%s> StopAllTasks done", cp.groupId) -} - -func (cp *MolassesConsensusProposer) HandleCCMsg(msg *quorumpb.CCMsg) error { - molacp_log.Debugf("<%s> HandleCCMsg called", cp.groupId) - cp.lock.Lock() - defer cp.lock.Unlock() - - //cast msg data to protobuf accoord to msg.Type - switch msg.Type { - case quorumpb.CCMsgType_CHANGE_CONSENSUS_REQ: - reqMsg := &quorumpb.ChangeConsensusReqMsg{} - err := proto.Unmarshal(msg.Data, reqMsg) - if err != nil { - molacp_log.Errorf("<%s> HandleCCReq: unmarshal req failed with error <%s>", cp.groupId, err.Error()) - return err - } - - bftTask, err := cp.createBftTask(cp.chainCtx, reqMsg) - if err != nil { - molacp_log.Debugf("<%s> HandleCCReq create bft task failed with error <%s>", cp.groupId, err.Error()) - return err - } else { - molacp_log.Debugf("<%s> HandleCCReq create bft task", cp.groupId) - } - - if cp.currBftTask != nil { - molacp_log.Debugf("<%s> HandleCCReq: currBftTask is not nil, cancel it", cp.groupId) - cp.currBftTask.cancel() - } - - cp.chBftTask <- bftTask - cp.currBftTask = bftTask - - case quorumpb.CCMsgType_CC_PROOF_HB: - hbmsg := &quorumpb.HBMsgv1{} - err := proto.Unmarshal(msg.Data, hbmsg) - if err != nil { - molacp_log.Errorf("<%s> HandleCCReq: unmarshal hbmsg failed with error <%s>", cp.groupId, err.Error()) - return err - } - molacp_log.Debugf("<%s> HandleHBPMsg called", cp.groupId) - if cp.currBftTask != nil { - cp.currBftTask.bft.HandleHBMsg(hbmsg) - } else { - molacp_log.Debug("<%s> currBftTask is nil", cp.groupId) - } - return nil - } - - return nil -} - -func (cp *MolassesConsensusProposer) createProposeTask(ctx context.Context, producers []string, agrmTickLen, agrmTickCnt, fromBlock, fromEpoch, epochDuration uint64) (*ConsensusProposeTask, error) { - molacp_log.Debugf("<%s> createProposeTask called", cp.groupId) - nonce, err := nodectx.GetNodeCtx().GetChainStorage().GetNextConsensusNonce(cp.groupId, cp.nodename) - if err != nil { - molacp_log.Errorf("<%s> get next consensus nonce failed", cp.groupId) - return nil, err - } - - //skip nonce 0 since nonce 0 is used by owner when create the group - if nonce == 0 { - nonce, err = nodectx.GetNodeCtx().GetChainStorage().GetNextConsensusNonce(cp.groupId, cp.nodename) - if err != nil { - molacp_log.Errorf("<%s> get next consensus nonce failed", cp.groupId) - return nil, err - } - } - - molacp_log.Debugf("<%s> get next consensus nonce <%d> ", cp.groupId, nonce) - - for _, p := range producers { - molacp_log.Debugf("<%s> producer <%s>", cp.groupId, p) - } - - //create req - req := &quorumpb.ChangeConsensusReq{ - ReqId: guuid.New().String(), - GroupId: cp.groupId, - Nonce: nonce, - ProducerPubkeyList: producers, - AgreementTickLenInMs: agrmTickLen, - AgreementTickCount: agrmTickCnt, - FromBlock: fromBlock, - FromEpoch: fromEpoch, - EpochDuration: epochDuration, - Contract: "", - SenderPubkey: cp.grpItem.UserSignPubkey, - Memo: "", - } - - //get hash and sign the req - byts, err := proto.Marshal(req) - if err != nil { - molacp_log.Errorf("<%s> marshal change consensus req failed", cp.groupId) - return nil, err - } - - hash := localcrypto.Hash(byts) - ks := nodectx.GetNodeCtx().Keystore - signature, _ := ks.EthSignByKeyName(cp.groupId, hash) - req.MsgHash = hash - req.SenderSign = signature - - reqBytes, err := proto.Marshal(req) - if err != nil { - molacp_log.Errorf("<%s> marshal change consensus req failed", cp.groupId) - return nil, err - } - - cpTask := &ConsensusProposeTask{ - Req: req, - ReqBytes: reqBytes, - } - - //create sender ctx - cpTask.ctx, cpTask.cancel = context.WithCancel(cp.chainCtx) - return cpTask, nil -} - -func (cp *MolassesConsensusProposer) createBftTask(ctx context.Context, reqMsg *quorumpb.ChangeConsensusReqMsg) (*PCBftTask, error) { - molacp_log.Debugf("<%s> createBftTask called", cp.groupId) - - retryCnt := reqMsg.ReqChangeConsensusRetryCnt - req := reqMsg.Req - - //check if req is from group owner - if cp.grpItem.OwnerPubKey != req.SenderPubkey { - molacp_log.Debugf("<%s> HandleCCReq reqid <%s> is not from group owner, ignore", cp.groupId, req.ReqId) - return nil, fmt.Errorf("req is not from group owner") - } - - //check if I am in the producer list (not owner) - if !cp.cIface.IsOwner() { - inTheList := false - for _, pubkey := range req.ProducerPubkeyList { - if pubkey == cp.grpItem.UserSignPubkey { - inTheList = true - break - } - } - if !inTheList { - molacp_log.Debugf("<%s> HandleCCReq reqid <%s> is not for me, ignore", cp.groupId, req.ReqId) - return nil, fmt.Errorf("req is not for me") - } - } - //verify if req is valid - dumpreq := &quorumpb.ChangeConsensusReq{ - ReqId: req.ReqId, - GroupId: req.GroupId, - Nonce: req.Nonce, - ProducerPubkeyList: req.ProducerPubkeyList, - AgreementTickLenInMs: req.AgreementTickLenInMs, - AgreementTickCount: req.AgreementTickCount, - FromBlock: req.FromBlock, - FromEpoch: req.FromEpoch, - EpochDuration: req.EpochDuration, - Contract: req.Contract, - SenderPubkey: req.SenderPubkey, - Memo: req.Memo, - MsgHash: nil, - SenderSign: nil, - } - - byts, err := proto.Marshal(dumpreq) - if err != nil { - molacp_log.Errorf("<%s> marshal change consensus req failed", cp.groupId) - return nil, err - } - - hash := localcrypto.Hash(byts) - if !bytes.Equal(hash, req.MsgHash) { - molacp_log.Debugf("<%s> HandleCCReq reqid <%s> hash is not same as req.MsgHash, ignore", cp.groupId, req.ReqId) - return nil, fmt.Errorf("hash is not same as req.MsgHash") - } - - //verify signature - verifySign, err := cp.cIface.VerifySign(hash, req.SenderSign, req.SenderPubkey) - - if err != nil { - molacp_log.Debugf("<%s> HandleCCReq reqid <%s> failed with error <%s>", cp.groupId, req.ReqId, err.Error()) - return nil, err - } - - if !verifySign { - molacp_log.Debug("<%s> HandleCCReq reqid <%s> verify sign failed", cp.groupId, req.ReqId) - return nil, fmt.Errorf("verify sign failed") - } - - //check if req is already exist or nonce is smaller than current nonces - history, err := nodectx.GetNodeCtx().GetChainStorage().GetAllChangeConsensusResult(cp.groupId, cp.nodename) - if err != nil { - return nil, err - } - - for _, item := range history { - if item.Req.ReqId == req.ReqId { - molacp_log.Debugf("<%s> change consensus result with reqId <%s> already exist, skip", cp.groupId, req.ReqId) - return nil, fmt.Errorf("change consensus result with reqId <%s> already exist", req.ReqId) - } - - if item.Req.Nonce > req.Nonce { - molacp_log.Debugf("<%s> change consensus result with reqId <%s> nonce <%d> is smaller than current nonce <%d>, skip", cp.groupId, req.ReqId, req.Nonce, item.Req.Nonce) - return nil, fmt.Errorf("change consensus result with reqId <%s> nonce <%d> is smaller than current nonce <%d>", req.ReqId, req.Nonce, item.Req.Nonce) - } - } - - // create resp - resp := &quorumpb.ChangeConsensusResp{ - RespId: guuid.New().String(), - GroupId: req.GroupId, - SenderPubkey: cp.grpItem.UserSignPubkey, - Req: req, - MsgHash: nil, - SenderSign: nil, - } - - byts, err = proto.Marshal(resp) - if err != nil { - molacp_log.Errorf("<%s> marshal change consensus resp failed", cp.groupId) - return nil, err - } - - hash = localcrypto.Hash(byts) - resp.MsgHash = hash - ks := nodectx.GetNodeCtx().Keystore - signature, _ := ks.EthSignByKeyName(cp.groupId, hash) - resp.SenderSign = signature - - // create Proof with retry cnt - proofBundle := &quorumpb.ChangeConsensusProof{ - ReqChangeConsensusRetryCnt: retryCnt, - Req: req, - Resp: resp, - } - - participants := make([]string, 0) - participants = append(participants, req.ProducerPubkeyList...) - - isOwnerInProducerList := false - for _, producer := range req.ProducerPubkeyList { - if producer == cp.grpItem.OwnerPubKey { - isOwnerInProducerList = true - break - } - } - - //if not add owner to the list to finish consensus - if !isOwnerInProducerList { - molacp_log.Debugf("<%s> owner is not in the producer list, to make consensus finished add owner to participants list", cp.groupId) - participants = append(participants, cp.grpItem.OwnerPubKey) - } else { - molacp_log.Debugf("<%s> owner is in the producer list", cp.groupId) - } - - // create bft config - config, err := cp.createBftConfig(participants) - if err != nil { - molacp_log.Errorf("<%s> create bft config failed", cp.groupId) - return nil, err - } - - // create new context - bftCtx, bftCancel := context.WithCancel(cp.chainCtx) - - // create channel to receive bft result - chBftDone := make(chan *quorumpb.ChangeConsensusResultBundle, 1) - - // create bft task - bftTask := &PCBftTask{ - ctx: bftCtx, - cancel: bftCancel, - bft: NewPCBft(bftCtx, *config, chBftDone, cp.cIface), - chBftDone: chBftDone, - Proof: proofBundle, - } - - bftTask.bft.AddProof(proofBundle) - return bftTask, nil -} - -func (cp *MolassesConsensusProposer) createBftConfig(producers []string) (*Config, error) { - molacp_log.Debugf("<%s> createBftConfig called", cp.groupId) - - config := &Config{ - GroupId: cp.groupId, - NodeName: cp.nodename, - MyPubkey: cp.grpItem.UserSignPubkey, - OwnerPubKey: cp.grpItem.OwnerPubKey, - - N: len(producers), - f: 0, - Nodes: producers, - BatchSize: 1, - } - - return config, nil -} diff --git a/pkg/consensus/pcacs.go b/pkg/consensus/pcacs.go deleted file mode 100644 index 6250c2a5..00000000 --- a/pkg/consensus/pcacs.go +++ /dev/null @@ -1,155 +0,0 @@ -package consensus - -import ( - "context" - "fmt" - - "github.com/rumsystem/quorum/internal/pkg/logging" - quorumpb "github.com/rumsystem/quorum/pkg/pb" - "google.golang.org/protobuf/proto" -) - -var pcacs_log = logging.Logger("pcacs") - -type PCAcs struct { - Config - rbcInsts map[string]*PCRbc - rbcOutput map[string]bool - rbcResults map[string][]byte - - chAcsDone chan *AcsResult - round uint64 - scopeId string -} - -func NewPCAcs(ctx context.Context, cfg Config, round uint64, scopeId string, chAcsDone chan *AcsResult) *PCAcs { - pcacs_log.Debugf("NewPCAcs called, round <%d>", round) - - acs := &PCAcs{ - Config: cfg, - round: round, - scopeId: scopeId, - rbcInsts: make(map[string]*PCRbc), - rbcOutput: make(map[string]bool), - rbcResults: make(map[string][]byte), - - chAcsDone: chAcsDone, - } - - for _, nodePubkey := range cfg.Nodes { - acs.rbcInsts[nodePubkey], _ = NewPCRbc(ctx, cfg, acs, acs.GroupId, acs.NodeName, acs.MyPubkey, nodePubkey) - } - - return acs -} - -// give input value to -func (a *PCAcs) InputValue(val []byte) error { - pcacs_log.Debug("InputValue called") - rbc, ok := a.rbcInsts[a.MyPubkey] - if !ok { - return fmt.Errorf("could not find rbc instance <%s>", a.MyPubkey) - } - - return rbc.InputValue(val) -} - -// rbc for proposerIs finished -func (a *PCAcs) RbcDone(proposerPubkey string) { - //pcacs_log.Debugf("RbcDone called, RBC <%s> finished", proposerPubkey) - pcacs_log.Debugf("Rbc <%s> finished", proposerPubkey) - a.rbcOutput[proposerPubkey] = true - - if len(a.rbcOutput) == a.N-a.f { - ptacs_log.Debugf("<%d> RBC finished, BFT done", a.N-a.f) - for rbcInst, _ := range a.rbcOutput { - a.rbcResults[rbcInst] = a.rbcInsts[rbcInst].Output() - } - - //notify acs done - a.chAcsDone <- &AcsResult{ - result: a.rbcResults, - } - } -} - -func (a *PCAcs) HandleHBMessage(hbmsg *quorumpb.HBMsgv1) error { - ptacs_log.Debugf("ACS HandleHBMessage called, acs round <%d>, msgType <%s>", a.round, hbmsg.PayloadType.String()) - - //check epoch(round) and scopeId (reqId) - if hbmsg.Epoch != a.round { - ptacs_log.Debugf("received HB msg epoch <%d> not match with acs epoch <%d>", hbmsg.Epoch, a.round) - return fmt.Errorf("received HB msg epoch <%d> not match with acs epoch <%d>", hbmsg.Epoch, a.round) - } - - if hbmsg.ScopeId != a.scopeId { - ptacs_log.Debugf("received HB msg scopeId <%s> not match with acs scopeId <%s>", hbmsg.ScopeId, a.scopeId) - return fmt.Errorf("received HB msg scopeId <%s> not match with acs scopeId <%s>", hbmsg.ScopeId, a.scopeId) - } - - switch hbmsg.PayloadType { - case quorumpb.HBMsgPayloadType_RBC: - return a.handleRbcMsg(hbmsg.Payload) - // case quorumpb.HBMsgPayloadType_BBA: - // return a.handleBbaMsg(hbmsg.Payload) - default: - return fmt.Errorf("received unknown type msg <%s>", hbmsg.PayloadType.String()) - } -} - -func (a *PCAcs) handleRbcMsg(payload []byte) error { - //ptacs_log.Debugf("handleRbcMsg called, Epoch <%d>", a.Epoch) - //cast payload to RBC message - rbcMsg := &quorumpb.RBCMsg{} - err := proto.Unmarshal(payload, rbcMsg) - if err != nil { - return err - } - - switch rbcMsg.Type { - case quorumpb.RBCMsgType_INIT_PROPOSE: - initp := &quorumpb.InitPropose{} - err := proto.Unmarshal(rbcMsg.Payload, initp) - if err != nil { - return err - } - - if initp.RecvNodePubkey != a.MyPubkey { - ptacs_log.Debugf("INIT_PROPOSE: sender <%s> receiver <%s>, NOT FOR ME, IGNORE", initp.ProposerPubkey, initp.RecvNodePubkey) - return nil - } - - rbc, ok := a.rbcInsts[initp.ProposerPubkey] - if !ok { - return fmt.Errorf("could not find rbc instance to handle InitPropose form <%s>", initp.ProposerPubkey) - } - //ptacs_log.Debugf("INIT_PROPOSE: is for me, handle it") - return rbc.handleInitProposeMsg(initp) - case quorumpb.RBCMsgType_ECHO: - echo := &quorumpb.Echo{} - err := proto.Unmarshal(rbcMsg.Payload, echo) - if err != nil { - return err - } - //give the ECHO msg to original proposer - rbc, ok := a.rbcInsts[echo.OriginalProposerPubkey] - if !ok { - return fmt.Errorf("could not find rbc instance to handle proof from <%s>, original propose <%s>", echo.EchoProviderPubkey, echo.OriginalProposerPubkey) - } - return rbc.handleEchoMsg(echo) - case quorumpb.RBCMsgType_READY: - ready := &quorumpb.Ready{} - err := proto.Unmarshal(rbcMsg.Payload, ready) - if err != nil { - return err - } - rbc, ok := a.rbcInsts[ready.OriginalProposerPubkey] - if !ok { - return fmt.Errorf("could not find rbc instance to handle ready from <%s>", ready.ReadyProviderPubkey) - } - return rbc.handleReadyMsg(ready) - - default: - return fmt.Errorf("received unknown rbc message, type (%s)", rbcMsg.Type) - } -} diff --git a/pkg/consensus/pcbft.go b/pkg/consensus/pcbft.go deleted file mode 100644 index 4e1d1c07..00000000 --- a/pkg/consensus/pcbft.go +++ /dev/null @@ -1,191 +0,0 @@ -package consensus - -import ( - "bytes" - "context" - "fmt" - - "github.com/golang/protobuf/proto" - "github.com/rumsystem/quorum/internal/pkg/logging" - "github.com/rumsystem/quorum/pkg/consensus/def" - localcrypto "github.com/rumsystem/quorum/pkg/crypto" - quorumpb "github.com/rumsystem/quorum/pkg/pb" -) - -var pcbft_log = logging.Logger("pcbft") - -type AcsResult struct { - result map[string][]byte -} - -type PCBft struct { - Config - - currProof *quorumpb.ChangeConsensusProof - currProotData []byte - - chBftDone chan *quorumpb.ChangeConsensusResultBundle - bftCtx context.Context - - acsInst *PCAcs - chAcsDone chan *AcsResult - cIface def.ChainMolassesIface -} - -func NewPCBft(ctx context.Context, cfg Config, ch chan *quorumpb.ChangeConsensusResultBundle, iface def.ChainMolassesIface) *PCBft { - //pcbft_log.Debugf("NewPCBft called") - return &PCBft{ - Config: cfg, - currProof: nil, - bftCtx: ctx, - chBftDone: ch, - cIface: iface, - chAcsDone: make(chan *AcsResult, 1), - } -} - -func (bft *PCBft) AddProof(proof *quorumpb.ChangeConsensusProof) { - pcbft_log.Debugf("AddProof called, reqid <%s>, nonce <%d> ", proof.Req.ReqId, proof.Req.Nonce) - bft.currProof = proof - datab, _ := proto.Marshal(proof) - bft.currProotData = datab - //for HB, RetryCnt work as Epoch, ReqId work as ScopeId - acs := NewPCAcs(bft.bftCtx, bft.Config, proof.ReqChangeConsensusRetryCnt, proof.Req.ReqId, bft.chAcsDone) - bft.acsInst = acs - pcbft_log.Debug("AddProof done") - -} - -func (bft *PCBft) Propose() error { - pcbft_log.Debugf("Propose called") - bft.acsInst.InputValue(bft.currProotData) - for { - select { - case <-bft.bftCtx.Done(): - pcbft_log.Debugf("<%s> bft ctx done, quit peacefully", bft.GroupId) - return nil - case acsResult := <-bft.chAcsDone: - pcbft_log.Debugf("acs done") - //verify raw result - ok, proofMap := bft.verifyRawResult(acsResult.result) - if !ok { - pcbft_log.Errorf("<%s> verify raw result failed", bft.GroupId) - resultBundle := &quorumpb.ChangeConsensusResultBundle{ - Result: quorumpb.ChangeConsensusResult_FAIL, - Req: bft.currProof.Req, - Resps: nil, - } - - //notify bft done - bft.chBftDone <- resultBundle - return fmt.Errorf("bft done but verify raw result failed, quit percefully") - } - - var resps []*quorumpb.ChangeConsensusResp - var producers []string - for _, proof := range proofMap { - resps = append(resps, proof.Resp) - producers = append(producers, proof.Resp.SenderPubkey) - } - - resultBundle := &quorumpb.ChangeConsensusResultBundle{ - Result: quorumpb.ChangeConsensusResult_SUCCESS, - Req: bft.currProof.Req, - Resps: resps, - } - //notify bft done - bft.chBftDone <- resultBundle - pcbft_log.Debugf("<%s> bft done, quit peacefully", bft.GroupId) - - return nil - } - } -} - -func (bft *PCBft) HandleHBMsg(hbmsg *quorumpb.HBMsgv1) error { - pcbft_log.Debugf("PCBFT HandleHBMsg called") - if bft.acsInst != nil { - bft.acsInst.HandleHBMessage(hbmsg) - } else { - pcbft_log.Errorf("<%s> acsInst is nil,??????", bft.GroupId) - } - return nil -} - -func (bft *PCBft) verifyRawResult(rawResult map[string][]byte) (bool, map[string]*quorumpb.ChangeConsensusProof) { - pcbft_log.Debugf("<%s> verifyRawResult called", bft.GroupId) - - //convert rawResultMap to proof map - proofMap := make(map[string]*quorumpb.ChangeConsensusProof) - for k, v := range rawResult { - proof := &quorumpb.ChangeConsensusProof{} - err := proto.Unmarshal(v, proof) - if err != nil { - pcbft_log.Errorf("<%s> unmarshal consensus proof failed", bft.GroupId) - return false, proofMap - } - proofMap[k] = proof - } - - //check if the maps contains responses from all required producers - for _, pubkey := range bft.currProof.Req.ProducerPubkeyList { - proof, ok := proofMap[pubkey] - if !ok { - pcbft_log.Errorf("<%s> proof map does not contains producerPubkey <%s>", bft.GroupId, pubkey) - return false, proofMap - } - - //check if sender is as same as producerPubkey - if proof.Resp.SenderPubkey != pubkey { - pcbft_log.Errorf("<%s> proof sender is not same as producerPubkey", bft.GroupId) - return false, proofMap - } - - //check if all req are the same as original req - if !proto.Equal(proof.Req, bft.currProof.Req) { - pcbft_log.Errorf("<%s> proof req is not same as original req", bft.GroupId) - return false, proofMap - } - - //check if all resp sign against the same original req - if !proto.Equal(proof.Req, proof.Resp.Req) { - pcbft_log.Errorf("<%s> proof req is not same as proof resp req", bft.GroupId) - return false, proofMap - } - - //check if all resp sign is valid - dumpResp := &quorumpb.ChangeConsensusResp{ - RespId: proof.Resp.RespId, - GroupId: proof.Resp.GroupId, - SenderPubkey: proof.Resp.SenderPubkey, - Req: proof.Resp.Req, - MsgHash: nil, - SenderSign: nil, - } - - byts, err := proto.Marshal(dumpResp) - if err != nil { - pcbft_log.Errorf("<%s> marshal change consensus resp failed", bft.GroupId) - return false, proofMap - } - - hash := localcrypto.Hash(byts) - if !bytes.Equal(hash, proof.Resp.MsgHash) { - pcbft_log.Errorf("<%s> proof resp hash is not same as original hash", bft.GroupId) - return false, proofMap - } - - isValid, err := bft.cIface.VerifySign(hash, proof.Resp.SenderSign, proof.Resp.SenderPubkey) - if err != nil { - pcbft_log.Errorf("<%s> verify proof resp sign failed", bft.GroupId) - return false, proofMap - } - - if !isValid { - pcbft_log.Errorf("<%s> proof resp sign is not valid", bft.GroupId) - return false, proofMap - } - } - - return true, proofMap -} diff --git a/pkg/consensus/pcrbc.go b/pkg/consensus/pcrbc.go deleted file mode 100644 index 8746371a..00000000 --- a/pkg/consensus/pcrbc.go +++ /dev/null @@ -1,349 +0,0 @@ -package consensus - -import ( - "context" - "fmt" - "time" - - guuid "github.com/google/uuid" - "github.com/klauspost/reedsolomon" - "github.com/rumsystem/quorum/internal/pkg/conn" - "github.com/rumsystem/quorum/internal/pkg/logging" - "google.golang.org/protobuf/proto" - - quorumpb "github.com/rumsystem/quorum/pkg/pb" -) - -var pcrbc_log = logging.Logger("pcrbc") - -type PCRbc struct { - Config - - rbcInstPubkey string - - numParityShards int - numDataShards int - - ecc reedsolomon.Encoder - - recvEchos map[string]Echos //key is string(roothash) - recvReadys map[string][]*quorumpb.Ready //key is string(roothash) - - output []byte - - readySent map[string]bool - consenusDone bool - - acs *PCAcs //for callback when finished -} - -// same as trx rbc -func NewPCRbc(ctx context.Context, cfg Config, acs *PCAcs, groupId, nodename, myPubkey, rbcInstPubkey string) (*PCRbc, error) { - //pcrbc_log.Debugf("NewPCRbc called, pubkey <%s>", rbcInstPubkey) - - var ( - parityShards = 2 * cfg.f //2f - dataShards = cfg.N - parityShards //N - 2f - ) - - //initial reed solomon codec - ecc, err := reedsolomon.New(dataShards, parityShards) //DataShards N-2f parityShards: 2f , totally N pieces - if err != nil { - return nil, err - } - - rbc := &PCRbc{ - Config: cfg, - rbcInstPubkey: rbcInstPubkey, - ecc: ecc, - recvEchos: make(map[string]Echos), - recvReadys: make(map[string][]*quorumpb.Ready), - numParityShards: parityShards, - numDataShards: dataShards, - readySent: make(map[string]bool), - consenusDone: false, - acs: acs, - } - - return rbc, nil -} - -func (r *PCRbc) InputValue(data []byte) error { - pcrbc_log.Debugf("<%s> Input value called, data length <%d>", r.rbcInstPubkey, len(data)) - - //create shards - shards, err := MakeShards(r.ecc, data) - if err != nil { - return err - } - - //create InitPropoeMsgs - originalDataSize := len(data) - initProposeMsgs, err := MakeRBCInitProposeMessage(r.GroupId, r.NodeName, r.MyPubkey, shards, r.Config.Nodes, originalDataSize) - - if err != nil { - pcrbc_log.Debugf(err.Error()) - return err - } - - pcrbc_log.Debugf("<%s> create InitProposeMsgs, len <%d>", r.rbcInstPubkey, len(initProposeMsgs)) - - // broadcast RBC msg out via pubsub - for _, initMsg := range initProposeMsgs { - pcrbc_log.Debugf("<%s> send InitProposeMsgs", r.rbcInstPubkey) - err := r.SendHBRBCMsg(initMsg) - if err != nil { - pcrbc_log.Debugf(err.Error()) - return err - } - time.Sleep(1000 * time.Millisecond) - } - - return nil -} - -func (r *PCRbc) handleInitProposeMsg(initp *quorumpb.InitPropose) error { - pcrbc_log.Infof("<%s> handleInitProposeMsg: Proposer <%s>, receiver <%s> (mypubkey <%s>)", r.rbcInstPubkey, initp.ProposerPubkey, initp.RecvNodePubkey, r.Config.MyPubkey) - if !r.IsProducer(initp.ProposerPubkey) { - return fmt.Errorf("<%s> receive proof from non producer <%s>", r.rbcInstPubkey, initp.ProposerPubkey) - } - - if !r.VerifySign() { - return fmt.Errorf("<%s> verify signature failed from producer <%s>", r.rbcInstPubkey, initp.ProposerPubkey) - } - - //valid initP msg - if isValid := ValidateInitPropose(initp); !isValid { - return fmt.Errorf("<%s> receive invalid InitPropose msg from producer<%s>", r.rbcInstPubkey, initp.ProposerPubkey) - } - - //make proof - proofMsg, err := MakeRBCEchoMessage(r.GroupId, r.NodeName, r.MyPubkey, initp, int(initp.OriginalDataSize)) - if err != nil { - return err - } - - pcrbc_log.Infof("<%s> create and send Echo msg for proposer <%s>", r.rbcInstPubkey, initp.ProposerPubkey) - return r.SendHBRBCMsg(proofMsg) -} - -func (r *PCRbc) handleEchoMsg(echo *quorumpb.Echo) error { - pcrbc_log.Infof("<%s> handleEchoMsg: EchoProviderPubkey <%s>", r.rbcInstPubkey, echo.EchoProviderPubkey) - - if !r.IsProducer(echo.EchoProviderPubkey) { - return fmt.Errorf("<%s> receive ECHO from non producer node <%s>", r.rbcInstPubkey, echo.EchoProviderPubkey) - } - - if !r.VerifySign() { - return fmt.Errorf("<%s> verify ECHO signature failed from producer node <%s>", r.rbcInstPubkey, echo.EchoProviderPubkey) - } - - if !ValidateEcho(echo) { - return fmt.Errorf("<%s> received invalid ECHO from producer node <%s>", r.rbcInstPubkey, echo.EchoProviderPubkey) - } - - roothashS := string(echo.RootHash) - //save echo by using roothash - pcrbc_log.Debugf("<%s> Save ECHO with roothash <%v>", r.rbcInstPubkey, echo.RootHash[:8]) - - r.recvEchos[roothashS] = append(r.recvEchos[roothashS], echo) - - //pcrbc_log.Debugf("<%s> RootHash <%v>, Recvived <%d> ECHO", r.rbcInstPubkey, echo.RootHash[:8], r.recvEchos[roothashS].Len()) - - if len(r.recvReadys[roothashS]) == 2*r.f+1 && r.recvEchos[roothashS].Len() >= r.N-2*r.f { - pcrbc_log.Debugf("<%s> RootHash <%s>, Recvived <%d> READY, which is 2F + 1", r.rbcInstPubkey, roothashS, len(r.recvReadys)) - pcrbc_log.Debugf("<%s> RootHash <%s>, Received <%d> ECHO, which is morn than N - 2F", r.rbcInstPubkey, roothashS, r.recvEchos[roothashS].Len()) - pcrbc_log.Debugf("<%s> RootHash <%s>, try decode", r.rbcInstPubkey) - - output, err := TryDecodeValue(r.recvEchos[roothashS], r.ecc, r.numParityShards, r.numDataShards) - if err != nil { - return err - } - - //pcrbc_log.Debugf("<%s> RBC for roothash <%s> is done", r.rbcInstPubkey, roothashS) - r.acs.RbcDone(r.rbcInstPubkey) - r.consenusDone = true - r.output = output - - return nil - } - - /* - • upon receiving valid ECHO(h,·,·) messages from N − f distinct parties, - – interpolate {s', j} from any N −2f leaves received - – recompute Merkle root h0 and if h0 != h then abort - – if READY(h) has not yet been sent, multicast READY(h) - */ - if r.recvEchos[roothashS].Len() == r.N-r.f { - pcrbc_log.Debugf("<%s> get N-F echo for rootHash <%v>, try decode", r.rbcInstPubkey, echo.RootHash[:8]) - output, err := TryDecodeValue(r.recvEchos[roothashS], r.ecc, r.numParityShards, r.numDataShards) - if err != nil { - return err - } - - //TBD, recal merkle root hash h0, compare with original root hash - - //check if ready sent - if r.readySent[roothashS] { - return nil - } - - //multicast READY msg - //pcrbc_log.Debugf("<%s> broadcast READY msg", r.rbcInstPubkey) - readyMsg, err := MakeRBCReadyMessage(r.GroupId, r.NodeName, r.MyPubkey, echo.OriginalProposerPubkey, echo.RootHash) - if err != nil { - return err - } - - err = r.SendHBRBCMsg(readyMsg) - if err != nil { - return err - } - - //set ready sent - r.readySent[roothashS] = true - - //set output - r.output = output - } - - return nil -} - -func (r *PCRbc) handleReadyMsg(ready *quorumpb.Ready) error { - pcrbc_log.Debugf("<%s> handle READY_MSG, ReadyProviderPubkey <%s>", r.rbcInstPubkey, ready.ReadyProviderPubkey) - - if !r.IsProducer(ready.ReadyProviderPubkey) { - return fmt.Errorf("<%s> receive READY from non producer node <%s>", r.rbcInstPubkey, ready.ReadyProviderPubkey) - } - - if !r.VerifySign() { - return fmt.Errorf("<%s> verify READY signature failed from producer node <%s>", r.rbcInstPubkey, ready.ReadyProviderPubkey) - } - - roothashS := string(ready.RootHash) - - //save it - pcrbc_log.Debugf("<%s> Save READY with roothash <%v>", r.rbcInstPubkey, ready.RootHash[:8]) - r.recvReadys[roothashS] = append(r.recvReadys[roothashS], ready) - - pcrbc_log.Debugf("<%s> RootHash <%v>, Recvived <%d> READY", r.rbcInstPubkey, ready.RootHash[:8], len(r.recvReadys[roothashS])) - - if r.consenusDone { - pcrbc_log.Debugf("<%s> RootHash <%v>, RBC is done, do nothing", r.rbcInstPubkey, ready.RootHash[:8]) - return nil - } - - /* - upon receiving f +1 matching READY(h) messages, if READY has not yet been sent, multicast READY(h) - */ - - if len(r.recvReadys[roothashS]) == r.f+1 { - pcrbc_log.Debugf("<%s> RootHash <%v>, get f + 1 <%d> READY", r.rbcInstPubkey, ready.RootHash[:8], r.f+1) - if !r.readySent[roothashS] { - pcrbc_log.Debugf("<%s> READY not send, boradcast now", r.rbcInstPubkey) - readyMsg, err := MakeRBCReadyMessage(r.GroupId, r.NodeName, r.MyPubkey, ready.OriginalProposerPubkey, ready.RootHash) - if err != nil { - return err - } - - err = r.SendHBRBCMsg(readyMsg) - if err != nil { - return err - } - - //set ready sent - r.readySent[roothashS] = true - } - } - - /* - upon receiving 2 f +1 matching READY(h) messages, wait for (at least) N −2f ECHO messages, then decode v - */ - if len(r.recvReadys[roothashS]) >= 2*r.f+1 { - pcrbc_log.Debugf("<%s> RootHash <%v>, Recvived <%d> READY, which is more than 2F + 1", r.rbcInstPubkey, ready.RootHash[:8], len(r.recvReadys)) - if r.recvEchos[roothashS].Len() >= r.N-2*r.f { - pcrbc_log.Debugf("<%s> RootHash <%v>, Received <%d> ECHO, which is more than N - 2F", r.rbcInstPubkey, ready.RootHash[:8], r.recvEchos[roothashS].Len()) - if r.output == nil { - pcrbc_log.Debugf("<%s> RootHash <%v>, not decoded yet, try decode", r.rbcInstPubkey, ready.RootHash[:8]) - output, err := TryDecodeValue(r.recvEchos[roothashS], r.ecc, r.numParityShards, r.numDataShards) - if err != nil { - return err - } - r.output = output - } else { - pcrbc_log.Debugf("<%s> RootHash <%v>, already decoded", r.rbcInstPubkey, ready.RootHash[:8]) - } - - pcrbc_log.Debugf("<%s> Roothash <%v>, RBC is done", r.rbcInstPubkey, ready.RootHash[:8]) - r.consenusDone = true - r.acs.RbcDone(r.rbcInstPubkey) - - return nil - } else { - pcrbc_log.Debugf("<%s> RootHash <%v> get enough READY but wait for more ECHO(now has <%d> ECHO)", r.rbcInstPubkey, ready.RootHash[:8], r.recvEchos[roothashS].Len()) - return nil - } - } - - //wait till get enough READY - pcrbc_log.Debugf("<%s> RootHash <%v> wait for more READY", r.rbcInstPubkey, ready.RootHash[:8]) - return nil -} - -func (r *PCRbc) Output() []byte { - if r.output != nil { - output := r.output - r.output = nil - return output - } - return nil -} - -func (r *PCRbc) IsProducer(pubkey string) bool { - for _, nodePubkey := range r.Nodes { - if nodePubkey == pubkey { - return true - } - } - return false -} - -func (r *PCRbc) VerifySign() bool { - return true -} - -func (r *PCRbc) SendHBRBCMsg(msg *quorumpb.RBCMsg) error { - rbcb, err := proto.Marshal(msg) - if err != nil { - return err - } - - hbmsg := &quorumpb.HBMsgv1{ - MsgId: guuid.New().String(), - ScopeId: r.acs.scopeId, - Epoch: r.acs.round, - PayloadType: quorumpb.HBMsgPayloadType_RBC, - Payload: rbcb, - } - - //marshall hbmsg to bytes - hbmsgb, err := proto.Marshal(hbmsg) - if err != nil { - return err - } - - //build ccMsg - ccMsg := &quorumpb.CCMsg{ - Type: quorumpb.CCMsgType_CC_PROOF_HB, - Data: hbmsgb, - } - - connMgr, err := conn.GetConn().GetConnMgr(r.GroupId) - if err != nil { - return err - } - - connMgr.BroadcastCCMsg(ccMsg) - return nil -} diff --git a/pkg/pb/chain.pb.go b/pkg/pb/chain.pb.go index 6c09ec64..ba352933 100644 --- a/pkg/pb/chain.pb.go +++ b/pkg/pb/chain.pb.go @@ -26,9 +26,8 @@ const ( PackageType_TRX PackageType = 0 PackageType_BLOCK PackageType = 1 PackageType_BFT_MSG PackageType = 2 - PackageType_CC_MSG PackageType = 3 //Change Consensus - PackageType_SYNC PackageType = 4 - PackageType_BROADCAST_MSG PackageType = 5 + PackageType_SYNC PackageType = 3 + PackageType_BROADCAST_MSG PackageType = 4 ) // Enum value maps for PackageType. @@ -37,17 +36,15 @@ var ( 0: "TRX", 1: "BLOCK", 2: "BFT_MSG", - 3: "CC_MSG", - 4: "SYNC", - 5: "BROADCAST_MSG", + 3: "SYNC", + 4: "BROADCAST_MSG", } PackageType_value = map[string]int32{ "TRX": 0, "BLOCK": 1, "BFT_MSG": 2, - "CC_MSG": 3, - "SYNC": 4, - "BROADCAST_MSG": 5, + "SYNC": 3, + "BROADCAST_MSG": 4, } ) @@ -509,99 +506,6 @@ func (BftMsgType) EnumDescriptor() ([]byte, []int) { return file_chain_proto_rawDescGZIP(), []int{9} } -//CC_MSG -type CCMsgType int32 - -const ( - CCMsgType_CHANGE_CONSENSUS_REQ CCMsgType = 0 // request change consensus - CCMsgType_CC_PROOF_HB CCMsgType = 1 // HB msg for change consensus -) - -// Enum value maps for CCMsgType. -var ( - CCMsgType_name = map[int32]string{ - 0: "CHANGE_CONSENSUS_REQ", - 1: "CC_PROOF_HB", - } - CCMsgType_value = map[string]int32{ - "CHANGE_CONSENSUS_REQ": 0, - "CC_PROOF_HB": 1, - } -) - -func (x CCMsgType) Enum() *CCMsgType { - p := new(CCMsgType) - *p = x - return p -} - -func (x CCMsgType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CCMsgType) Descriptor() protoreflect.EnumDescriptor { - return file_chain_proto_enumTypes[10].Descriptor() -} - -func (CCMsgType) Type() protoreflect.EnumType { - return &file_chain_proto_enumTypes[10] -} - -func (x CCMsgType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CCMsgType.Descriptor instead. -func (CCMsgType) EnumDescriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{10} -} - -type ChangeConsensusResult int32 - -const ( - ChangeConsensusResult_SUCCESS ChangeConsensusResult = 0 - ChangeConsensusResult_FAIL ChangeConsensusResult = 1 -) - -// Enum value maps for ChangeConsensusResult. -var ( - ChangeConsensusResult_name = map[int32]string{ - 0: "SUCCESS", - 1: "FAIL", - } - ChangeConsensusResult_value = map[string]int32{ - "SUCCESS": 0, - "FAIL": 1, - } -) - -func (x ChangeConsensusResult) Enum() *ChangeConsensusResult { - p := new(ChangeConsensusResult) - *p = x - return p -} - -func (x ChangeConsensusResult) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ChangeConsensusResult) Descriptor() protoreflect.EnumDescriptor { - return file_chain_proto_enumTypes[11].Descriptor() -} - -func (ChangeConsensusResult) Type() protoreflect.EnumType { - return &file_chain_proto_enumTypes[11] -} - -func (x ChangeConsensusResult) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ChangeConsensusResult.Descriptor instead. -func (ChangeConsensusResult) EnumDescriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{11} -} - //SYNC_MSG type SyncMsgType int32 @@ -633,11 +537,11 @@ func (x SyncMsgType) String() string { } func (SyncMsgType) Descriptor() protoreflect.EnumDescriptor { - return file_chain_proto_enumTypes[12].Descriptor() + return file_chain_proto_enumTypes[10].Descriptor() } func (SyncMsgType) Type() protoreflect.EnumType { - return &file_chain_proto_enumTypes[12] + return &file_chain_proto_enumTypes[10] } func (x SyncMsgType) Number() protoreflect.EnumNumber { @@ -646,7 +550,7 @@ func (x SyncMsgType) Number() protoreflect.EnumNumber { // Deprecated: Use SyncMsgType.Descriptor instead. func (SyncMsgType) EnumDescriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{12} + return file_chain_proto_rawDescGZIP(), []int{10} } type ReqBlkResult int32 @@ -682,11 +586,11 @@ func (x ReqBlkResult) String() string { } func (ReqBlkResult) Descriptor() protoreflect.EnumDescriptor { - return file_chain_proto_enumTypes[13].Descriptor() + return file_chain_proto_enumTypes[11].Descriptor() } func (ReqBlkResult) Type() protoreflect.EnumType { - return &file_chain_proto_enumTypes[13] + return &file_chain_proto_enumTypes[11] } func (x ReqBlkResult) Number() protoreflect.EnumNumber { @@ -695,7 +599,7 @@ func (x ReqBlkResult) Number() protoreflect.EnumNumber { // Deprecated: Use ReqBlkResult.Descriptor instead. func (ReqBlkResult) EnumDescriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{13} + return file_chain_proto_rawDescGZIP(), []int{11} } //BROADCAST_MSG @@ -726,11 +630,11 @@ func (x BroadcastType) String() string { } func (BroadcastType) Descriptor() protoreflect.EnumDescriptor { - return file_chain_proto_enumTypes[14].Descriptor() + return file_chain_proto_enumTypes[12].Descriptor() } func (BroadcastType) Type() protoreflect.EnumType { - return &file_chain_proto_enumTypes[14] + return &file_chain_proto_enumTypes[12] } func (x BroadcastType) Number() protoreflect.EnumNumber { @@ -739,7 +643,7 @@ func (x BroadcastType) Number() protoreflect.EnumNumber { // Deprecated: Use BroadcastType.Descriptor instead. func (BroadcastType) EnumDescriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{14} + return file_chain_proto_rawDescGZIP(), []int{12} } type GroupEncryptType int32 @@ -772,11 +676,11 @@ func (x GroupEncryptType) String() string { } func (GroupEncryptType) Descriptor() protoreflect.EnumDescriptor { - return file_chain_proto_enumTypes[15].Descriptor() + return file_chain_proto_enumTypes[13].Descriptor() } func (GroupEncryptType) Type() protoreflect.EnumType { - return &file_chain_proto_enumTypes[15] + return &file_chain_proto_enumTypes[13] } func (x GroupEncryptType) Number() protoreflect.EnumNumber { @@ -785,7 +689,7 @@ func (x GroupEncryptType) Number() protoreflect.EnumNumber { // Deprecated: Use GroupEncryptType.Descriptor instead. func (GroupEncryptType) EnumDescriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{15} + return file_chain_proto_rawDescGZIP(), []int{13} } type GroupConsenseType int32 @@ -818,11 +722,11 @@ func (x GroupConsenseType) String() string { } func (GroupConsenseType) Descriptor() protoreflect.EnumDescriptor { - return file_chain_proto_enumTypes[16].Descriptor() + return file_chain_proto_enumTypes[14].Descriptor() } func (GroupConsenseType) Type() protoreflect.EnumType { - return &file_chain_proto_enumTypes[16] + return &file_chain_proto_enumTypes[14] } func (x GroupConsenseType) Number() protoreflect.EnumNumber { @@ -831,7 +735,7 @@ func (x GroupConsenseType) Number() protoreflect.EnumNumber { // Deprecated: Use GroupConsenseType.Descriptor instead. func (GroupConsenseType) EnumDescriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{16} + return file_chain_proto_rawDescGZIP(), []int{14} } type HBMsgPayloadType int32 @@ -864,11 +768,11 @@ func (x HBMsgPayloadType) String() string { } func (HBMsgPayloadType) Descriptor() protoreflect.EnumDescriptor { - return file_chain_proto_enumTypes[17].Descriptor() + return file_chain_proto_enumTypes[15].Descriptor() } func (HBMsgPayloadType) Type() protoreflect.EnumType { - return &file_chain_proto_enumTypes[17] + return &file_chain_proto_enumTypes[15] } func (x HBMsgPayloadType) Number() protoreflect.EnumNumber { @@ -877,7 +781,7 @@ func (x HBMsgPayloadType) Number() protoreflect.EnumNumber { // Deprecated: Use HBMsgPayloadType.Descriptor instead. func (HBMsgPayloadType) EnumDescriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{17} + return file_chain_proto_rawDescGZIP(), []int{15} } type RBCMsgType int32 @@ -913,11 +817,11 @@ func (x RBCMsgType) String() string { } func (RBCMsgType) Descriptor() protoreflect.EnumDescriptor { - return file_chain_proto_enumTypes[18].Descriptor() + return file_chain_proto_enumTypes[16].Descriptor() } func (RBCMsgType) Type() protoreflect.EnumType { - return &file_chain_proto_enumTypes[18] + return &file_chain_proto_enumTypes[16] } func (x RBCMsgType) Number() protoreflect.EnumNumber { @@ -926,7 +830,7 @@ func (x RBCMsgType) Number() protoreflect.EnumNumber { // Deprecated: Use RBCMsgType.Descriptor instead. func (RBCMsgType) EnumDescriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{18} + return file_chain_proto_rawDescGZIP(), []int{16} } type BBAMsgType int32 @@ -959,11 +863,11 @@ func (x BBAMsgType) String() string { } func (BBAMsgType) Descriptor() protoreflect.EnumDescriptor { - return file_chain_proto_enumTypes[19].Descriptor() + return file_chain_proto_enumTypes[17].Descriptor() } func (BBAMsgType) Type() protoreflect.EnumType { - return &file_chain_proto_enumTypes[19] + return &file_chain_proto_enumTypes[17] } func (x BBAMsgType) Number() protoreflect.EnumNumber { @@ -972,7 +876,7 @@ func (x BBAMsgType) Number() protoreflect.EnumNumber { // Deprecated: Use BBAMsgType.Descriptor instead. func (BBAMsgType) EnumDescriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{19} + return file_chain_proto_rawDescGZIP(), []int{17} } type Package struct { @@ -2173,614 +2077,84 @@ func (x *Block) GetBlockId() uint64 { if x != nil { return x.BlockId } - return 0 -} - -func (x *Block) GetPrevHash() []byte { - if x != nil { - return x.PrevHash - } - return nil -} - -func (x *Block) GetProducerPubkey() string { - if x != nil { - return x.ProducerPubkey - } - return "" -} - -func (x *Block) GetTrxs() []*Trx { - if x != nil { - return x.Trxs - } - return nil -} - -func (x *Block) GetTimeStamp() int64 { - if x != nil { - return x.TimeStamp - } - return 0 -} - -func (x *Block) GetConsensus() *ConsensusInfo { - if x != nil { - return x.Consensus - } - return nil -} - -func (x *Block) GetBlockHash() []byte { - if x != nil { - return x.BlockHash - } - return nil -} - -func (x *Block) GetProducerSign() []byte { - if x != nil { - return x.ProducerSign - } - return nil -} - -type BftMsg struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type BftMsgType `protobuf:"varint,1,opt,name=Type,proto3,enum=quorum.pb.BftMsgType" json:"Type,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"` -} - -func (x *BftMsg) Reset() { - *x = BftMsg{} - if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BftMsg) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BftMsg) ProtoMessage() {} - -func (x *BftMsg) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BftMsg.ProtoReflect.Descriptor instead. -func (*BftMsg) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{15} -} - -func (x *BftMsg) GetType() BftMsgType { - if x != nil { - return x.Type - } - return BftMsgType_HB_BFT -} - -func (x *BftMsg) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -type CCMsg struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type CCMsgType `protobuf:"varint,1,opt,name=Type,proto3,enum=quorum.pb.CCMsgType" json:"Type,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"` -} - -func (x *CCMsg) Reset() { - *x = CCMsg{} - if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CCMsg) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CCMsg) ProtoMessage() {} - -func (x *CCMsg) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CCMsg.ProtoReflect.Descriptor instead. -func (*CCMsg) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{16} -} - -func (x *CCMsg) GetType() CCMsgType { - if x != nil { - return x.Type - } - return CCMsgType_CHANGE_CONSENSUS_REQ -} - -func (x *CCMsg) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -type ChangeConsensusReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ReqId string `protobuf:"bytes,1,opt,name=ReqId,proto3" json:"ReqId,omitempty"` - GroupId string `protobuf:"bytes,2,opt,name=GroupId,proto3" json:"GroupId,omitempty"` - Nonce uint64 `protobuf:"varint,3,opt,name=Nonce,proto3" json:"Nonce,omitempty"` - ProducerPubkeyList []string `protobuf:"bytes,4,rep,name=ProducerPubkeyList,proto3" json:"ProducerPubkeyList,omitempty"` - AgreementTickLenInMs uint64 `protobuf:"varint,5,opt,name=AgreementTickLenInMs,proto3" json:"AgreementTickLenInMs,omitempty"` - AgreementTickCount uint64 `protobuf:"varint,6,opt,name=AgreementTickCount,proto3" json:"AgreementTickCount,omitempty"` - FromBlock uint64 `protobuf:"varint,7,opt,name=FromBlock,proto3" json:"FromBlock,omitempty"` - FromEpoch uint64 `protobuf:"varint,8,opt,name=FromEpoch,proto3" json:"FromEpoch,omitempty"` - EpochDuration uint64 `protobuf:"varint,9,opt,name=EpochDuration,proto3" json:"EpochDuration,omitempty"` - Contract string `protobuf:"bytes,10,opt,name=Contract,proto3" json:"Contract,omitempty"` - SenderPubkey string `protobuf:"bytes,12,opt,name=SenderPubkey,proto3" json:"SenderPubkey,omitempty"` - Memo string `protobuf:"bytes,13,opt,name=Memo,proto3" json:"Memo,omitempty"` - MsgHash []byte `protobuf:"bytes,14,opt,name=MsgHash,proto3" json:"MsgHash,omitempty"` - SenderSign []byte `protobuf:"bytes,15,opt,name=SenderSign,proto3" json:"SenderSign,omitempty"` -} - -func (x *ChangeConsensusReq) Reset() { - *x = ChangeConsensusReq{} - if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChangeConsensusReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChangeConsensusReq) ProtoMessage() {} - -func (x *ChangeConsensusReq) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChangeConsensusReq.ProtoReflect.Descriptor instead. -func (*ChangeConsensusReq) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{17} -} - -func (x *ChangeConsensusReq) GetReqId() string { - if x != nil { - return x.ReqId - } - return "" -} - -func (x *ChangeConsensusReq) GetGroupId() string { - if x != nil { - return x.GroupId - } - return "" -} - -func (x *ChangeConsensusReq) GetNonce() uint64 { - if x != nil { - return x.Nonce - } - return 0 -} - -func (x *ChangeConsensusReq) GetProducerPubkeyList() []string { - if x != nil { - return x.ProducerPubkeyList - } - return nil -} - -func (x *ChangeConsensusReq) GetAgreementTickLenInMs() uint64 { - if x != nil { - return x.AgreementTickLenInMs - } - return 0 -} - -func (x *ChangeConsensusReq) GetAgreementTickCount() uint64 { - if x != nil { - return x.AgreementTickCount - } - return 0 -} - -func (x *ChangeConsensusReq) GetFromBlock() uint64 { - if x != nil { - return x.FromBlock - } - return 0 -} - -func (x *ChangeConsensusReq) GetFromEpoch() uint64 { - if x != nil { - return x.FromEpoch - } - return 0 -} - -func (x *ChangeConsensusReq) GetEpochDuration() uint64 { - if x != nil { - return x.EpochDuration - } - return 0 -} - -func (x *ChangeConsensusReq) GetContract() string { - if x != nil { - return x.Contract - } - return "" -} - -func (x *ChangeConsensusReq) GetSenderPubkey() string { - if x != nil { - return x.SenderPubkey - } - return "" -} - -func (x *ChangeConsensusReq) GetMemo() string { - if x != nil { - return x.Memo - } - return "" -} - -func (x *ChangeConsensusReq) GetMsgHash() []byte { - if x != nil { - return x.MsgHash - } - return nil -} - -func (x *ChangeConsensusReq) GetSenderSign() []byte { - if x != nil { - return x.SenderSign - } - return nil -} - -type ChangeConsensusReqMsg struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Req *ChangeConsensusReq `protobuf:"bytes,1,opt,name=Req,proto3" json:"Req,omitempty"` - ReqChangeConsensusRetryCnt uint64 `protobuf:"varint,2,opt,name=ReqChangeConsensusRetryCnt,proto3" json:"ReqChangeConsensusRetryCnt,omitempty"` -} - -func (x *ChangeConsensusReqMsg) Reset() { - *x = ChangeConsensusReqMsg{} - if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChangeConsensusReqMsg) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChangeConsensusReqMsg) ProtoMessage() {} - -func (x *ChangeConsensusReqMsg) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChangeConsensusReqMsg.ProtoReflect.Descriptor instead. -func (*ChangeConsensusReqMsg) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{18} -} - -func (x *ChangeConsensusReqMsg) GetReq() *ChangeConsensusReq { - if x != nil { - return x.Req - } - return nil -} - -func (x *ChangeConsensusReqMsg) GetReqChangeConsensusRetryCnt() uint64 { - if x != nil { - return x.ReqChangeConsensusRetryCnt - } - return 0 -} - -type ChangeConsensusResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RespId string `protobuf:"bytes,1,opt,name=RespId,proto3" json:"RespId,omitempty"` - GroupId string `protobuf:"bytes,2,opt,name=GroupId,proto3" json:"GroupId,omitempty"` - Req *ChangeConsensusReq `protobuf:"bytes,3,opt,name=Req,proto3" json:"Req,omitempty"` - SenderPubkey string `protobuf:"bytes,4,opt,name=SenderPubkey,proto3" json:"SenderPubkey,omitempty"` - Memo string `protobuf:"bytes,5,opt,name=Memo,proto3" json:"Memo,omitempty"` - MsgHash []byte `protobuf:"bytes,6,opt,name=MsgHash,proto3" json:"MsgHash,omitempty"` - SenderSign []byte `protobuf:"bytes,7,opt,name=SenderSign,proto3" json:"SenderSign,omitempty"` -} - -func (x *ChangeConsensusResp) Reset() { - *x = ChangeConsensusResp{} - if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChangeConsensusResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChangeConsensusResp) ProtoMessage() {} - -func (x *ChangeConsensusResp) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChangeConsensusResp.ProtoReflect.Descriptor instead. -func (*ChangeConsensusResp) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{19} -} - -func (x *ChangeConsensusResp) GetRespId() string { - if x != nil { - return x.RespId - } - return "" -} - -func (x *ChangeConsensusResp) GetGroupId() string { - if x != nil { - return x.GroupId - } - return "" -} - -func (x *ChangeConsensusResp) GetReq() *ChangeConsensusReq { - if x != nil { - return x.Req - } - return nil -} - -func (x *ChangeConsensusResp) GetSenderPubkey() string { - if x != nil { - return x.SenderPubkey - } - return "" -} - -func (x *ChangeConsensusResp) GetMemo() string { - if x != nil { - return x.Memo - } - return "" -} - -func (x *ChangeConsensusResp) GetMsgHash() []byte { - if x != nil { - return x.MsgHash - } - return nil -} - -func (x *ChangeConsensusResp) GetSenderSign() []byte { - if x != nil { - return x.SenderSign - } - return nil -} - -type ChangeConsensusRespMsg struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Resp *ChangeConsensusResp `protobuf:"bytes,1,opt,name=Resp,proto3" json:"Resp,omitempty"` - ReqChangeConsensusRetryCnt uint64 `protobuf:"varint,2,opt,name=ReqChangeConsensusRetryCnt,proto3" json:"ReqChangeConsensusRetryCnt,omitempty"` -} - -func (x *ChangeConsensusRespMsg) Reset() { - *x = ChangeConsensusRespMsg{} - if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChangeConsensusRespMsg) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChangeConsensusRespMsg) ProtoMessage() {} - -func (x *ChangeConsensusRespMsg) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChangeConsensusRespMsg.ProtoReflect.Descriptor instead. -func (*ChangeConsensusRespMsg) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{20} -} - -func (x *ChangeConsensusRespMsg) GetResp() *ChangeConsensusResp { - if x != nil { - return x.Resp - } - return nil -} - -func (x *ChangeConsensusRespMsg) GetReqChangeConsensusRetryCnt() uint64 { - if x != nil { - return x.ReqChangeConsensusRetryCnt - } - return 0 -} - -type ChangeConsensusProof struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ReqChangeConsensusRetryCnt uint64 `protobuf:"varint,1,opt,name=ReqChangeConsensusRetryCnt,proto3" json:"ReqChangeConsensusRetryCnt,omitempty"` - Req *ChangeConsensusReq `protobuf:"bytes,2,opt,name=Req,proto3" json:"Req,omitempty"` - Resp *ChangeConsensusResp `protobuf:"bytes,3,opt,name=Resp,proto3" json:"Resp,omitempty"` + return 0 } -func (x *ChangeConsensusProof) Reset() { - *x = ChangeConsensusProof{} - if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *Block) GetPrevHash() []byte { + if x != nil { + return x.PrevHash } + return nil } -func (x *ChangeConsensusProof) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *Block) GetProducerPubkey() string { + if x != nil { + return x.ProducerPubkey + } + return "" } -func (*ChangeConsensusProof) ProtoMessage() {} - -func (x *ChangeConsensusProof) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *Block) GetTrxs() []*Trx { + if x != nil { + return x.Trxs } - return mi.MessageOf(x) + return nil } -// Deprecated: Use ChangeConsensusProof.ProtoReflect.Descriptor instead. -func (*ChangeConsensusProof) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{21} +func (x *Block) GetTimeStamp() int64 { + if x != nil { + return x.TimeStamp + } + return 0 } -func (x *ChangeConsensusProof) GetReqChangeConsensusRetryCnt() uint64 { +func (x *Block) GetConsensus() *ConsensusInfo { if x != nil { - return x.ReqChangeConsensusRetryCnt + return x.Consensus } - return 0 + return nil } -func (x *ChangeConsensusProof) GetReq() *ChangeConsensusReq { +func (x *Block) GetBlockHash() []byte { if x != nil { - return x.Req + return x.BlockHash } return nil } -func (x *ChangeConsensusProof) GetResp() *ChangeConsensusResp { +func (x *Block) GetProducerSign() []byte { if x != nil { - return x.Resp + return x.ProducerSign } return nil } -type ChangeConsensusResultBundle struct { +type BftMsg struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Req *ChangeConsensusReq `protobuf:"bytes,1,opt,name=Req,proto3" json:"Req,omitempty"` - Resps []*ChangeConsensusResp `protobuf:"bytes,2,rep,name=Resps,proto3" json:"Resps,omitempty"` - Result ChangeConsensusResult `protobuf:"varint,3,opt,name=Result,proto3,enum=quorum.pb.ChangeConsensusResult" json:"Result,omitempty"` + Type BftMsgType `protobuf:"varint,1,opt,name=Type,proto3,enum=quorum.pb.BftMsgType" json:"Type,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"` } -func (x *ChangeConsensusResultBundle) Reset() { - *x = ChangeConsensusResultBundle{} +func (x *BftMsg) Reset() { + *x = BftMsg{} if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[22] + mi := &file_chain_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ChangeConsensusResultBundle) String() string { +func (x *BftMsg) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ChangeConsensusResultBundle) ProtoMessage() {} +func (*BftMsg) ProtoMessage() {} -func (x *ChangeConsensusResultBundle) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[22] +func (x *BftMsg) ProtoReflect() protoreflect.Message { + mi := &file_chain_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2791,32 +2165,25 @@ func (x *ChangeConsensusResultBundle) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ChangeConsensusResultBundle.ProtoReflect.Descriptor instead. -func (*ChangeConsensusResultBundle) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{22} +// Deprecated: Use BftMsg.ProtoReflect.Descriptor instead. +func (*BftMsg) Descriptor() ([]byte, []int) { + return file_chain_proto_rawDescGZIP(), []int{15} } -func (x *ChangeConsensusResultBundle) GetReq() *ChangeConsensusReq { +func (x *BftMsg) GetType() BftMsgType { if x != nil { - return x.Req + return x.Type } - return nil + return BftMsgType_HB_BFT } -func (x *ChangeConsensusResultBundle) GetResps() []*ChangeConsensusResp { +func (x *BftMsg) GetData() []byte { if x != nil { - return x.Resps + return x.Data } return nil } -func (x *ChangeConsensusResultBundle) GetResult() ChangeConsensusResult { - if x != nil { - return x.Result - } - return ChangeConsensusResult_SUCCESS -} - type SyncMsg struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2830,7 +2197,7 @@ type SyncMsg struct { func (x *SyncMsg) Reset() { *x = SyncMsg{} if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[23] + mi := &file_chain_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2843,7 +2210,7 @@ func (x *SyncMsg) String() string { func (*SyncMsg) ProtoMessage() {} func (x *SyncMsg) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[23] + mi := &file_chain_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2856,7 +2223,7 @@ func (x *SyncMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMsg.ProtoReflect.Descriptor instead. func (*SyncMsg) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{23} + return file_chain_proto_rawDescGZIP(), []int{16} } func (x *SyncMsg) GetGroupId() string { @@ -2896,7 +2263,7 @@ type ReqBlock struct { func (x *ReqBlock) Reset() { *x = ReqBlock{} if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[24] + mi := &file_chain_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2909,7 +2276,7 @@ func (x *ReqBlock) String() string { func (*ReqBlock) ProtoMessage() {} func (x *ReqBlock) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[24] + mi := &file_chain_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2922,7 +2289,7 @@ func (x *ReqBlock) ProtoReflect() protoreflect.Message { // Deprecated: Use ReqBlock.ProtoReflect.Descriptor instead. func (*ReqBlock) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{24} + return file_chain_proto_rawDescGZIP(), []int{17} } func (x *ReqBlock) GetGroupId() string { @@ -2987,7 +2354,7 @@ type ReqBlockResp struct { func (x *ReqBlockResp) Reset() { *x = ReqBlockResp{} if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[25] + mi := &file_chain_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3000,7 +2367,7 @@ func (x *ReqBlockResp) String() string { func (*ReqBlockResp) ProtoMessage() {} func (x *ReqBlockResp) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[25] + mi := &file_chain_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3013,7 +2380,7 @@ func (x *ReqBlockResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ReqBlockResp.ProtoReflect.Descriptor instead. func (*ReqBlockResp) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{25} + return file_chain_proto_rawDescGZIP(), []int{18} } func (x *ReqBlockResp) GetGroupId() string { @@ -3097,7 +2464,7 @@ type BlocksBundle struct { func (x *BlocksBundle) Reset() { *x = BlocksBundle{} if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[26] + mi := &file_chain_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3110,7 +2477,7 @@ func (x *BlocksBundle) String() string { func (*BlocksBundle) ProtoMessage() {} func (x *BlocksBundle) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[26] + mi := &file_chain_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3123,7 +2490,7 @@ func (x *BlocksBundle) ProtoReflect() protoreflect.Message { // Deprecated: Use BlocksBundle.ProtoReflect.Descriptor instead. func (*BlocksBundle) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{26} + return file_chain_proto_rawDescGZIP(), []int{19} } func (x *BlocksBundle) GetBlocks() []*Block { @@ -3145,7 +2512,7 @@ type BroadcastMsg struct { func (x *BroadcastMsg) Reset() { *x = BroadcastMsg{} if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[27] + mi := &file_chain_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3158,7 +2525,7 @@ func (x *BroadcastMsg) String() string { func (*BroadcastMsg) ProtoMessage() {} func (x *BroadcastMsg) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[27] + mi := &file_chain_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3171,7 +2538,7 @@ func (x *BroadcastMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use BroadcastMsg.ProtoReflect.Descriptor instead. func (*BroadcastMsg) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{27} + return file_chain_proto_rawDescGZIP(), []int{20} } func (x *BroadcastMsg) GetType() BroadcastType { @@ -3209,7 +2576,7 @@ type GroupItem struct { func (x *GroupItem) Reset() { *x = GroupItem{} if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[28] + mi := &file_chain_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3222,7 +2589,7 @@ func (x *GroupItem) String() string { func (*GroupItem) ProtoMessage() {} func (x *GroupItem) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[28] + mi := &file_chain_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3235,7 +2602,7 @@ func (x *GroupItem) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupItem.ProtoReflect.Descriptor instead. func (*GroupItem) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{28} + return file_chain_proto_rawDescGZIP(), []int{21} } func (x *GroupItem) GetGroupId() string { @@ -3334,7 +2701,7 @@ type GroupSeed struct { func (x *GroupSeed) Reset() { *x = GroupSeed{} if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[29] + mi := &file_chain_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3347,7 +2714,7 @@ func (x *GroupSeed) String() string { func (*GroupSeed) ProtoMessage() {} func (x *GroupSeed) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[29] + mi := &file_chain_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3360,7 +2727,7 @@ func (x *GroupSeed) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupSeed.ProtoReflect.Descriptor instead. func (*GroupSeed) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{29} + return file_chain_proto_rawDescGZIP(), []int{22} } func (x *GroupSeed) GetGenesisBlock() *Block { @@ -3441,7 +2808,7 @@ type NodeSDKGroupItem struct { func (x *NodeSDKGroupItem) Reset() { *x = NodeSDKGroupItem{} if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[30] + mi := &file_chain_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3454,7 +2821,7 @@ func (x *NodeSDKGroupItem) String() string { func (*NodeSDKGroupItem) ProtoMessage() {} func (x *NodeSDKGroupItem) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[30] + mi := &file_chain_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3467,7 +2834,7 @@ func (x *NodeSDKGroupItem) ProtoReflect() protoreflect.Message { // Deprecated: Use NodeSDKGroupItem.ProtoReflect.Descriptor instead. func (*NodeSDKGroupItem) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{30} + return file_chain_proto_rawDescGZIP(), []int{23} } func (x *NodeSDKGroupItem) GetGroup() *GroupItem { @@ -3506,7 +2873,6 @@ func (x *NodeSDKGroupItem) GetGroupSeed() string { } //HB_MSG -//HB protocol is used for both change consensus and bft type HBTrxBundle struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3518,7 +2884,7 @@ type HBTrxBundle struct { func (x *HBTrxBundle) Reset() { *x = HBTrxBundle{} if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[31] + mi := &file_chain_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3531,7 +2897,7 @@ func (x *HBTrxBundle) String() string { func (*HBTrxBundle) ProtoMessage() {} func (x *HBTrxBundle) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[31] + mi := &file_chain_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3544,7 +2910,7 @@ func (x *HBTrxBundle) ProtoReflect() protoreflect.Message { // Deprecated: Use HBTrxBundle.ProtoReflect.Descriptor instead. func (*HBTrxBundle) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{31} + return file_chain_proto_rawDescGZIP(), []int{24} } func (x *HBTrxBundle) GetTrxs() []*Trx { @@ -3569,7 +2935,7 @@ type HBMsgv1 struct { func (x *HBMsgv1) Reset() { *x = HBMsgv1{} if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[32] + mi := &file_chain_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3582,7 +2948,7 @@ func (x *HBMsgv1) String() string { func (*HBMsgv1) ProtoMessage() {} func (x *HBMsgv1) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[32] + mi := &file_chain_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3595,7 +2961,7 @@ func (x *HBMsgv1) ProtoReflect() protoreflect.Message { // Deprecated: Use HBMsgv1.ProtoReflect.Descriptor instead. func (*HBMsgv1) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{32} + return file_chain_proto_rawDescGZIP(), []int{25} } func (x *HBMsgv1) GetMsgId() string { @@ -3646,7 +3012,7 @@ type RBCMsg struct { func (x *RBCMsg) Reset() { *x = RBCMsg{} if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[33] + mi := &file_chain_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3659,7 +3025,7 @@ func (x *RBCMsg) String() string { func (*RBCMsg) ProtoMessage() {} func (x *RBCMsg) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[33] + mi := &file_chain_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3672,7 +3038,7 @@ func (x *RBCMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use RBCMsg.ProtoReflect.Descriptor instead. func (*RBCMsg) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{33} + return file_chain_proto_rawDescGZIP(), []int{26} } func (x *RBCMsg) GetType() RBCMsgType { @@ -3707,7 +3073,7 @@ type InitPropose struct { func (x *InitPropose) Reset() { *x = InitPropose{} if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[34] + mi := &file_chain_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3720,7 +3086,7 @@ func (x *InitPropose) String() string { func (*InitPropose) ProtoMessage() {} func (x *InitPropose) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[34] + mi := &file_chain_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3733,7 +3099,7 @@ func (x *InitPropose) ProtoReflect() protoreflect.Message { // Deprecated: Use InitPropose.ProtoReflect.Descriptor instead. func (*InitPropose) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{34} + return file_chain_proto_rawDescGZIP(), []int{27} } func (x *InitPropose) GetRootHash() []byte { @@ -3810,7 +3176,7 @@ type Echo struct { func (x *Echo) Reset() { *x = Echo{} if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[35] + mi := &file_chain_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3823,7 +3189,7 @@ func (x *Echo) String() string { func (*Echo) ProtoMessage() {} func (x *Echo) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[35] + mi := &file_chain_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3836,7 +3202,7 @@ func (x *Echo) ProtoReflect() protoreflect.Message { // Deprecated: Use Echo.ProtoReflect.Descriptor instead. func (*Echo) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{35} + return file_chain_proto_rawDescGZIP(), []int{28} } func (x *Echo) GetRootHash() []byte { @@ -3909,7 +3275,7 @@ type Ready struct { func (x *Ready) Reset() { *x = Ready{} if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[36] + mi := &file_chain_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3922,7 +3288,7 @@ func (x *Ready) String() string { func (*Ready) ProtoMessage() {} func (x *Ready) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[36] + mi := &file_chain_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3935,7 +3301,7 @@ func (x *Ready) ProtoReflect() protoreflect.Message { // Deprecated: Use Ready.ProtoReflect.Descriptor instead. func (*Ready) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{36} + return file_chain_proto_rawDescGZIP(), []int{29} } func (x *Ready) GetRootHash() []byte { @@ -3979,7 +3345,7 @@ type BBAMsg struct { func (x *BBAMsg) Reset() { *x = BBAMsg{} if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[37] + mi := &file_chain_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3992,7 +3358,7 @@ func (x *BBAMsg) String() string { func (*BBAMsg) ProtoMessage() {} func (x *BBAMsg) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[37] + mi := &file_chain_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4005,7 +3371,7 @@ func (x *BBAMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use BBAMsg.ProtoReflect.Descriptor instead. func (*BBAMsg) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{37} + return file_chain_proto_rawDescGZIP(), []int{30} } func (x *BBAMsg) GetType() BBAMsgType { @@ -4036,7 +3402,7 @@ type Bval struct { func (x *Bval) Reset() { *x = Bval{} if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[38] + mi := &file_chain_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4049,7 +3415,7 @@ func (x *Bval) String() string { func (*Bval) ProtoMessage() {} func (x *Bval) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[38] + mi := &file_chain_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4062,7 +3428,7 @@ func (x *Bval) ProtoReflect() protoreflect.Message { // Deprecated: Use Bval.ProtoReflect.Descriptor instead. func (*Bval) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{38} + return file_chain_proto_rawDescGZIP(), []int{31} } func (x *Bval) GetProposerId() string { @@ -4107,7 +3473,7 @@ type Aux struct { func (x *Aux) Reset() { *x = Aux{} if protoimpl.UnsafeEnabled { - mi := &file_chain_proto_msgTypes[39] + mi := &file_chain_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4120,7 +3486,7 @@ func (x *Aux) String() string { func (*Aux) ProtoMessage() {} func (x *Aux) ProtoReflect() protoreflect.Message { - mi := &file_chain_proto_msgTypes[39] + mi := &file_chain_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4133,7 +3499,7 @@ func (x *Aux) ProtoReflect() protoreflect.Message { // Deprecated: Use Aux.ProtoReflect.Descriptor instead. func (*Aux) Descriptor() ([]byte, []int) { - return file_chain_proto_rawDescGZIP(), []int{39} + return file_chain_proto_rawDescGZIP(), []int{32} } func (x *Aux) GetProposerId() string { @@ -4356,361 +3722,263 @@ var file_chain_proto_rawDesc = []byte{ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x66, 0x74, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x45, 0x0a, 0x05, 0x43, 0x43, 0x4d, 0x73, - 0x67, 0x12, 0x28, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x14, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x43, 0x4d, 0x73, - 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x44, - 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, - 0xde, 0x03, 0x0a, 0x12, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, - 0x73, 0x75, 0x73, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x52, 0x65, 0x71, 0x49, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x52, 0x65, 0x71, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x12, - 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x4c, 0x69, - 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, - 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x14, - 0x41, 0x67, 0x72, 0x65, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x4c, 0x65, 0x6e, - 0x49, 0x6e, 0x4d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x41, 0x67, 0x72, 0x65, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x4c, 0x65, 0x6e, 0x49, 0x6e, 0x4d, 0x73, - 0x12, 0x2e, 0x0a, 0x12, 0x41, 0x67, 0x72, 0x65, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x63, - 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x41, 0x67, - 0x72, 0x65, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x1c, 0x0a, 0x09, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x09, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1c, - 0x0a, 0x09, 0x46, 0x72, 0x6f, 0x6d, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x09, 0x46, 0x72, 0x6f, 0x6d, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x24, 0x0a, 0x0d, - 0x45, 0x70, 0x6f, 0x63, 0x68, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0d, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x22, - 0x0a, 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, - 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x4d, 0x65, 0x6d, 0x6f, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x48, 0x61, 0x73, - 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x4d, 0x73, 0x67, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x1e, 0x0a, 0x0a, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, - 0x22, 0x88, 0x01, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x65, - 0x6e, 0x73, 0x75, 0x73, 0x52, 0x65, 0x71, 0x4d, 0x73, 0x67, 0x12, 0x2f, 0x0a, 0x03, 0x52, 0x65, - 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, - 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, - 0x73, 0x75, 0x73, 0x52, 0x65, 0x71, 0x52, 0x03, 0x52, 0x65, 0x71, 0x12, 0x3e, 0x0a, 0x1a, 0x52, - 0x65, 0x71, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, - 0x73, 0x52, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x1a, 0x52, 0x65, 0x71, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, - 0x73, 0x75, 0x73, 0x52, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6e, 0x74, 0x22, 0xea, 0x01, 0x0a, 0x13, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x52, 0x65, 0x73, 0x70, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x03, 0x52, 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x52, 0x03, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x53, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x4d, 0x65, - 0x6d, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x18, - 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x48, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x07, 0x4d, 0x73, 0x67, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x0a, 0x53, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x53, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x22, 0x8c, 0x01, 0x0a, 0x16, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x4d, 0x73, 0x67, 0x12, 0x32, 0x0a, 0x04, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x52, 0x04, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3e, 0x0a, 0x1a, 0x52, 0x65, 0x71, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, 0x65, 0x74, - 0x72, 0x79, 0x43, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1a, 0x52, 0x65, 0x71, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, - 0x65, 0x74, 0x72, 0x79, 0x43, 0x6e, 0x74, 0x22, 0xbb, 0x01, 0x0a, 0x14, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x6f, 0x66, - 0x12, 0x3e, 0x0a, 0x1a, 0x52, 0x65, 0x71, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, - 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x1a, 0x52, 0x65, 0x71, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, - 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6e, 0x74, - 0x12, 0x2f, 0x0a, 0x03, 0x52, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, - 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, 0x65, 0x71, 0x52, 0x03, 0x52, 0x65, - 0x71, 0x12, 0x32, 0x0a, 0x04, 0x52, 0x65, 0x73, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x52, - 0x04, 0x52, 0x65, 0x73, 0x70, 0x22, 0xbe, 0x01, 0x0a, 0x1b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, - 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x2f, 0x0a, 0x03, 0x52, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x52, 0x03, 0x52, 0x65, 0x71, 0x12, 0x34, 0x0a, 0x05, 0x52, 0x65, 0x73, 0x70, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, - 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x52, 0x05, 0x52, 0x65, 0x73, 0x70, 0x73, 0x12, 0x38, 0x0a, 0x06, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x71, - 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, - 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x63, 0x0a, 0x07, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x73, - 0x67, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x04, 0x54, - 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x71, 0x75, 0x6f, 0x72, - 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0xae, 0x01, 0x0a, 0x08, - 0x52, 0x65, 0x71, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x12, 0x24, 0x0a, 0x0d, 0x42, 0x6c, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x42, 0x6c, 0x6b, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x52, 0x65, 0x71, 0x50, 0x75, 0x62, - 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x52, 0x65, 0x71, 0x50, 0x75, - 0x62, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x48, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x04, 0x48, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x69, 0x67, 0x6e, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x53, 0x69, 0x67, 0x6e, 0x22, 0xec, 0x02, 0x0a, - 0x0c, 0x52, 0x65, 0x71, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, - 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, - 0x79, 0x12, 0x26, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x50, 0x75, 0x62, - 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x50, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x06, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x71, 0x75, 0x6f, 0x72, - 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x42, 0x6c, 0x6b, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x52, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x46, 0x72, - 0x6f, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x46, - 0x72, 0x6f, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x0a, 0x0d, 0x42, 0x6c, 0x6b, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0d, 0x42, 0x6c, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x22, - 0x0a, 0x0c, 0x42, 0x6c, 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x42, 0x6c, 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x06, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x06, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x48, 0x61, 0x73, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x04, 0x48, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x69, 0x67, 0x6e, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x53, 0x69, 0x67, 0x6e, 0x22, 0x38, 0x0a, 0x0c, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x71, 0x75, - 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x06, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x22, 0x50, 0x0a, 0x0c, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, - 0x73, 0x74, 0x4d, 0x73, 0x67, 0x12, 0x2c, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, - 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0xc8, 0x03, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, - 0x1c, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, - 0x0b, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, - 0x26, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x75, 0x62, 0x6b, 0x65, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x69, 0x67, - 0x6e, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x45, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x11, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x50, - 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x71, 0x75, - 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x0c, 0x47, - 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x3d, 0x0a, 0x0b, 0x45, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1b, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x45, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x43, 0x6f, - 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1c, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, - 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x70, - 0x70, 0x4b, 0x65, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x41, 0x70, 0x70, 0x4b, - 0x65, 0x79, 0x22, 0xbd, 0x02, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x65, 0x64, - 0x12, 0x34, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, - 0x70, 0x62, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, - 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, - 0x12, 0x1c, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, - 0x0a, 0x0b, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, - 0x12, 0x24, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x54, 0x79, 0x70, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, - 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, - 0x0a, 0x09, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x28, 0x0c, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x63, 0x0a, 0x07, 0x53, 0x79, 0x6e, 0x63, + 0x4d, 0x73, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x2a, 0x0a, + 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x71, 0x75, + 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x73, 0x67, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, + 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0xae, 0x01, + 0x0a, 0x08, 0x52, 0x65, 0x71, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x12, 0x24, 0x0a, 0x0d, 0x42, 0x6c, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x42, 0x6c, 0x6b, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x52, 0x65, 0x71, 0x50, + 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x52, 0x65, 0x71, + 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x48, 0x61, 0x73, 0x68, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x48, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x69, + 0x67, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x53, 0x69, 0x67, 0x6e, 0x22, 0xec, + 0x02, 0x0a, 0x0c, 0x52, 0x65, 0x71, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x18, 0x0a, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x50, 0x75, 0x62, + 0x6b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x50, + 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x06, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x71, 0x75, + 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x42, 0x6c, 0x6b, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1c, 0x0a, 0x09, + 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x09, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x0a, 0x0d, 0x42, 0x6c, + 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0d, 0x42, 0x6c, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, + 0x12, 0x22, 0x0a, 0x0c, 0x42, 0x6c, 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x42, 0x6c, 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x06, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, + 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x06, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x48, 0x61, 0x73, 0x68, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x04, 0x48, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x69, 0x67, + 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x53, 0x69, 0x67, 0x6e, 0x22, 0x38, 0x0a, + 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x28, 0x0a, + 0x06, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, + 0x06, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x22, 0x50, 0x0a, 0x0c, 0x42, 0x72, 0x6f, 0x61, 0x64, + 0x63, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x12, 0x2c, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, + 0x62, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0xc8, 0x03, 0x0a, 0x09, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, + 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x50, 0x75, 0x62, 0x4b, 0x65, + 0x79, 0x12, 0x26, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x75, 0x62, + 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x53, + 0x69, 0x67, 0x6e, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x11, 0x55, 0x73, 0x65, + 0x72, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x4c, 0x61, 0x73, + 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, + 0x69, 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, + 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x3d, 0x0a, + 0x0b, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x0b, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x40, 0x0a, 0x0c, + 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x0c, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, - 0x41, 0x70, 0x70, 0x4b, 0x65, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x41, 0x70, - 0x70, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x10, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x44, 0x4b, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x2a, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, - 0x70, 0x62, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x41, 0x6c, - 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x45, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x41, - 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x69, 0x67, 0x6e, - 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x70, 0x69, 0x55, 0x72, 0x6c, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x41, 0x70, 0x69, 0x55, 0x72, 0x6c, 0x12, 0x1c, 0x0a, - 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x65, 0x64, 0x22, 0x31, 0x0a, 0x0b, 0x48, - 0x42, 0x54, 0x72, 0x78, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x54, 0x72, - 0x78, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, - 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x72, 0x78, 0x52, 0x04, 0x54, 0x72, 0x78, 0x73, 0x22, 0xa8, - 0x01, 0x0a, 0x07, 0x48, 0x42, 0x4d, 0x73, 0x67, 0x76, 0x31, 0x12, 0x14, 0x0a, 0x05, 0x4d, 0x73, - 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x4d, 0x73, 0x67, 0x49, 0x64, - 0x12, 0x18, 0x0a, 0x07, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x70, - 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x45, 0x70, 0x6f, 0x63, 0x68, - 0x12, 0x3d, 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, - 0x62, 0x2e, 0x48, 0x42, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x0b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x4d, 0x0a, 0x06, 0x52, 0x42, 0x43, - 0x4d, 0x73, 0x67, 0x12, 0x29, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x42, - 0x43, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x8d, 0x02, 0x0a, 0x0b, 0x49, 0x6e, 0x69, - 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x6f, 0x6f, 0x74, - 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x52, 0x6f, 0x6f, 0x74, - 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0c, 0x52, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x12, 0x16, 0x0a, 0x06, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x06, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x4f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x10, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, - 0x53, 0x69, 0x7a, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x52, 0x65, 0x63, 0x76, 0x4e, 0x6f, 0x64, 0x65, - 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x52, 0x65, - 0x63, 0x76, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x0e, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x50, 0x75, - 0x62, 0x6b, 0x65, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, - 0x53, 0x69, 0x67, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x22, 0xa6, 0x02, 0x0a, 0x04, 0x45, 0x63, 0x68, - 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x6f, 0x6f, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x08, 0x52, 0x6f, 0x6f, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, - 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x50, 0x72, - 0x6f, 0x6f, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x4c, 0x65, 0x61, - 0x76, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x4c, 0x65, 0x61, 0x76, 0x65, - 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, - 0x61, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x4f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x36, 0x0a, + 0x41, 0x70, 0x70, 0x4b, 0x65, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x41, 0x70, + 0x70, 0x4b, 0x65, 0x79, 0x22, 0xbd, 0x02, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, + 0x65, 0x64, 0x12, 0x34, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, + 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x0c, 0x47, 0x65, 0x6e, 0x65, + 0x73, 0x69, 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, + 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x54, + 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x43, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x45, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x16, + 0x0a, 0x06, 0x41, 0x70, 0x70, 0x4b, 0x65, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x41, 0x70, 0x70, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x10, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x44, 0x4b, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x2a, 0x0a, 0x05, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, + 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x41, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x45, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x69, 0x67, + 0x6e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x69, + 0x67, 0x6e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x70, 0x69, 0x55, 0x72, + 0x6c, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x41, 0x70, 0x69, 0x55, 0x72, 0x6c, 0x12, + 0x1c, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x65, 0x64, 0x22, 0x31, 0x0a, + 0x0b, 0x48, 0x42, 0x54, 0x72, 0x78, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x04, + 0x54, 0x72, 0x78, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x71, 0x75, 0x6f, + 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x72, 0x78, 0x52, 0x04, 0x54, 0x72, 0x78, 0x73, + 0x22, 0xa8, 0x01, 0x0a, 0x07, 0x48, 0x42, 0x4d, 0x73, 0x67, 0x76, 0x31, 0x12, 0x14, 0x0a, 0x05, + 0x4d, 0x73, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x4d, 0x73, 0x67, + 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, + 0x45, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x45, 0x70, 0x6f, + 0x63, 0x68, 0x12, 0x3d, 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, + 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x42, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x4d, 0x0a, 0x06, 0x52, + 0x42, 0x43, 0x4d, 0x73, 0x67, 0x12, 0x29, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, + 0x52, 0x42, 0x43, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x8d, 0x02, 0x0a, 0x0b, 0x49, + 0x6e, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x6f, + 0x6f, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x52, 0x6f, + 0x6f, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x14, 0x0a, 0x05, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x4f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x61, + 0x74, 0x61, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x52, 0x65, 0x63, 0x76, 0x4e, 0x6f, + 0x64, 0x65, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x52, 0x65, 0x63, 0x76, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x26, + 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, + 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x22, 0xa6, 0x02, 0x0a, 0x04, 0x45, + 0x63, 0x68, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x6f, 0x6f, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x52, 0x6f, 0x6f, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, + 0x14, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, + 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x4c, + 0x65, 0x61, 0x76, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x4c, 0x65, 0x61, + 0x76, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, + 0x61, 0x74, 0x61, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x4f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x36, 0x0a, 0x16, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, - 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x4f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x50, - 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x12, 0x45, 0x63, 0x68, 0x6f, 0x50, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x12, 0x45, 0x63, 0x68, 0x6f, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x50, - 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x10, 0x45, 0x63, 0x68, 0x6f, 0x50, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x10, 0x45, 0x63, 0x68, 0x6f, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x69, 0x67, - 0x6e, 0x22, 0xbb, 0x01, 0x0a, 0x05, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x52, - 0x6f, 0x6f, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x52, - 0x6f, 0x6f, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x36, 0x0a, 0x16, 0x4f, 0x72, 0x69, 0x67, 0x69, + 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x12, 0x45, 0x63, 0x68, 0x6f, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x12, 0x45, 0x63, 0x68, 0x6f, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x10, 0x45, 0x63, 0x68, 0x6f, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x10, 0x45, 0x63, 0x68, 0x6f, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, + 0x69, 0x67, 0x6e, 0x22, 0xbb, 0x01, 0x0a, 0x05, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x1a, 0x0a, + 0x08, 0x52, 0x6f, 0x6f, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x08, 0x52, 0x6f, 0x6f, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x36, 0x0a, 0x16, 0x4f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, + 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, - 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, - 0x30, 0x0a, 0x13, 0x52, 0x65, 0x61, 0x64, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x52, 0x65, - 0x61, 0x64, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, - 0x79, 0x12, 0x2c, 0x0a, 0x11, 0x52, 0x65, 0x61, 0x64, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x52, 0x65, - 0x61, 0x64, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x22, - 0x4d, 0x0a, 0x06, 0x42, 0x42, 0x41, 0x4d, 0x73, 0x67, 0x12, 0x29, 0x0a, 0x04, 0x54, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, - 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x42, 0x41, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x76, - 0x0a, 0x04, 0x42, 0x76, 0x61, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x53, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x70, - 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x45, 0x70, 0x6f, 0x63, 0x68, - 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x75, 0x0a, 0x03, 0x41, 0x75, 0x78, 0x12, 0x1e, 0x0a, - 0x0a, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, - 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x05, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2a, 0x57, 0x0a, - 0x0b, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, - 0x54, 0x52, 0x58, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x01, - 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x46, 0x54, 0x5f, 0x4d, 0x53, 0x47, 0x10, 0x02, 0x12, 0x0a, 0x0a, - 0x06, 0x43, 0x43, 0x5f, 0x4d, 0x53, 0x47, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x59, 0x4e, - 0x43, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, - 0x5f, 0x4d, 0x53, 0x47, 0x10, 0x05, 0x2a, 0x2c, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, - 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x53, 0x5f, 0x55, 0x53, 0x45, - 0x52, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x53, 0x5f, 0x50, 0x52, 0x4f, 0x44, 0x55, 0x43, - 0x45, 0x52, 0x10, 0x01, 0x2a, 0x21, 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x44, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x52, - 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x10, 0x01, 0x2a, 0x26, 0x0a, 0x0e, 0x54, 0x72, 0x78, 0x53, 0x74, - 0x72, 0x6f, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x48, 0x41, - 0x49, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x41, 0x43, 0x48, 0x45, 0x10, 0x01, 0x2a, - 0x5f, 0x0a, 0x07, 0x54, 0x72, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x4f, - 0x53, 0x54, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x4e, 0x4e, 0x4f, 0x55, 0x4e, 0x43, 0x45, - 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x50, 0x44, 0x5f, 0x47, 0x52, 0x50, 0x5f, 0x55, 0x53, - 0x45, 0x52, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x43, 0x4f, - 0x4e, 0x46, 0x49, 0x47, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x50, 0x50, 0x5f, 0x43, 0x4f, - 0x4e, 0x46, 0x49, 0x47, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x4f, 0x52, 0x4b, 0x10, 0x05, - 0x2a, 0x4c, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x52, 0x58, 0x5f, 0x41, - 0x55, 0x54, 0x48, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x50, - 0x44, 0x5f, 0x44, 0x4e, 0x59, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, - 0x55, 0x50, 0x44, 0x5f, 0x41, 0x4c, 0x57, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x02, 0x2a, 0x37, - 0x0a, 0x0b, 0x54, 0x72, 0x78, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x13, 0x0a, - 0x0f, 0x46, 0x4f, 0x4c, 0x4c, 0x4f, 0x57, 0x5f, 0x41, 0x4c, 0x57, 0x5f, 0x4c, 0x49, 0x53, 0x54, - 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x4f, 0x4c, 0x4c, 0x4f, 0x57, 0x5f, 0x44, 0x4e, 0x59, - 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x01, 0x2a, 0x2d, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x68, 0x4c, - 0x69, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x4c, 0x4c, 0x4f, 0x57, - 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x4e, 0x59, 0x5f, - 0x4c, 0x49, 0x53, 0x54, 0x10, 0x01, 0x2a, 0x2e, 0x0a, 0x0d, 0x41, 0x70, 0x70, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x49, 0x4e, 0x54, 0x10, 0x00, - 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, - 0x52, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x2a, 0x18, 0x0a, 0x0a, 0x42, 0x66, 0x74, 0x4d, 0x73, 0x67, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x42, 0x5f, 0x42, 0x46, 0x54, 0x10, 0x00, - 0x2a, 0x36, 0x0a, 0x09, 0x43, 0x43, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, - 0x14, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x45, 0x4e, 0x53, 0x55, - 0x53, 0x5f, 0x52, 0x45, 0x51, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x43, 0x5f, 0x50, 0x52, - 0x4f, 0x4f, 0x46, 0x5f, 0x48, 0x42, 0x10, 0x01, 0x2a, 0x2e, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x08, - 0x0a, 0x04, 0x46, 0x41, 0x49, 0x4c, 0x10, 0x01, 0x2a, 0x30, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, - 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x51, 0x5f, 0x42, - 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x51, 0x5f, 0x42, 0x4c, - 0x4f, 0x43, 0x4b, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x10, 0x01, 0x2a, 0x50, 0x0a, 0x0c, 0x52, 0x65, - 0x71, 0x42, 0x6c, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x11, 0x0a, 0x0d, 0x42, 0x4c, - 0x4f, 0x43, 0x4b, 0x5f, 0x49, 0x4e, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x10, 0x00, 0x12, 0x18, 0x0a, - 0x14, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x49, 0x4e, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x5f, 0x4f, - 0x4e, 0x5f, 0x54, 0x4f, 0x50, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, - 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x2a, 0x1c, 0x0a, 0x0d, - 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, - 0x07, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x4c, 0x10, 0x00, 0x2a, 0x2b, 0x0a, 0x10, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, - 0x0a, 0x06, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, - 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x11, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, - 0x50, 0x4f, 0x41, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x4f, 0x53, 0x10, 0x01, 0x2a, 0x24, - 0x0a, 0x10, 0x48, 0x42, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x52, 0x42, 0x43, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x42, - 0x42, 0x41, 0x10, 0x01, 0x2a, 0x33, 0x0a, 0x0a, 0x52, 0x42, 0x43, 0x4d, 0x73, 0x67, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, 0x49, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, - 0x53, 0x45, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x45, 0x43, 0x48, 0x4f, 0x10, 0x01, 0x12, 0x09, - 0x0a, 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x02, 0x2a, 0x1f, 0x0a, 0x0a, 0x42, 0x42, 0x41, - 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x56, 0x41, 0x4c, 0x10, - 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x55, 0x58, 0x10, 0x01, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x75, 0x6d, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x2f, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x12, 0x30, 0x0a, 0x13, 0x52, 0x65, 0x61, 0x64, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, + 0x52, 0x65, 0x61, 0x64, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x50, 0x75, 0x62, + 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x11, 0x52, 0x65, 0x61, 0x64, 0x79, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, + 0x52, 0x65, 0x61, 0x64, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x69, 0x67, + 0x6e, 0x22, 0x4d, 0x0a, 0x06, 0x42, 0x42, 0x41, 0x4d, 0x73, 0x67, 0x12, 0x29, 0x0a, 0x04, 0x54, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x6f, 0x72, + 0x75, 0x6d, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x42, 0x41, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x22, 0x76, 0x0a, 0x04, 0x42, 0x76, 0x61, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x53, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x45, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x45, 0x70, 0x6f, + 0x63, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x75, 0x0a, 0x03, 0x41, 0x75, 0x78, 0x12, + 0x1e, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x22, 0x0a, 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x75, 0x62, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x05, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2a, + 0x4b, 0x0a, 0x0b, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, + 0x0a, 0x03, 0x54, 0x52, 0x58, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x4c, 0x4f, 0x43, 0x4b, + 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x46, 0x54, 0x5f, 0x4d, 0x53, 0x47, 0x10, 0x02, 0x12, + 0x08, 0x0a, 0x04, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x42, 0x52, 0x4f, + 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x5f, 0x4d, 0x53, 0x47, 0x10, 0x04, 0x2a, 0x2c, 0x0a, 0x0c, + 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, + 0x41, 0x53, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x53, 0x5f, + 0x50, 0x52, 0x4f, 0x44, 0x55, 0x43, 0x45, 0x52, 0x10, 0x01, 0x2a, 0x21, 0x0a, 0x0a, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x44, 0x44, 0x10, + 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x10, 0x01, 0x2a, 0x26, 0x0a, + 0x0e, 0x54, 0x72, 0x78, 0x53, 0x74, 0x72, 0x6f, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x09, 0x0a, 0x05, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x41, + 0x43, 0x48, 0x45, 0x10, 0x01, 0x2a, 0x5f, 0x0a, 0x07, 0x54, 0x72, 0x78, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x08, 0x0a, 0x04, 0x50, 0x4f, 0x53, 0x54, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x4e, + 0x4e, 0x4f, 0x55, 0x4e, 0x43, 0x45, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x50, 0x44, 0x5f, + 0x47, 0x52, 0x50, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x48, + 0x41, 0x49, 0x4e, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, + 0x41, 0x50, 0x50, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, + 0x46, 0x4f, 0x52, 0x4b, 0x10, 0x05, 0x2a, 0x4c, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x45, 0x54, + 0x5f, 0x54, 0x52, 0x58, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x10, 0x00, + 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x50, 0x44, 0x5f, 0x44, 0x4e, 0x59, 0x5f, 0x4c, 0x49, 0x53, 0x54, + 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x50, 0x44, 0x5f, 0x41, 0x4c, 0x57, 0x5f, 0x4c, 0x49, + 0x53, 0x54, 0x10, 0x02, 0x2a, 0x37, 0x0a, 0x0b, 0x54, 0x72, 0x78, 0x41, 0x75, 0x74, 0x68, 0x4d, + 0x6f, 0x64, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x4f, 0x4c, 0x4c, 0x4f, 0x57, 0x5f, 0x41, 0x4c, + 0x57, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x4f, 0x4c, 0x4c, + 0x4f, 0x57, 0x5f, 0x44, 0x4e, 0x59, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x01, 0x2a, 0x2d, 0x0a, + 0x0c, 0x41, 0x75, 0x74, 0x68, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, + 0x0a, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x00, 0x12, 0x0d, 0x0a, + 0x09, 0x44, 0x45, 0x4e, 0x59, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x01, 0x2a, 0x2e, 0x0a, 0x0d, + 0x41, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, + 0x03, 0x49, 0x4e, 0x54, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x01, + 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x2a, 0x18, 0x0a, 0x0a, + 0x42, 0x66, 0x74, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x42, + 0x5f, 0x42, 0x46, 0x54, 0x10, 0x00, 0x2a, 0x30, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x73, + 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x51, 0x5f, 0x42, 0x4c, 0x4f, + 0x43, 0x4b, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x51, 0x5f, 0x42, 0x4c, 0x4f, 0x43, + 0x4b, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x10, 0x01, 0x2a, 0x50, 0x0a, 0x0c, 0x52, 0x65, 0x71, 0x42, + 0x6c, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x11, 0x0a, 0x0d, 0x42, 0x4c, 0x4f, 0x43, + 0x4b, 0x5f, 0x49, 0x4e, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x42, + 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x49, 0x4e, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x5f, 0x4f, 0x4e, 0x5f, + 0x54, 0x4f, 0x50, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x4e, + 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x2a, 0x1c, 0x0a, 0x0d, 0x42, 0x72, + 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x47, + 0x45, 0x4e, 0x45, 0x52, 0x41, 0x4c, 0x10, 0x00, 0x2a, 0x2b, 0x0a, 0x10, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, + 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x49, 0x56, + 0x41, 0x54, 0x45, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x11, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, + 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x4f, + 0x41, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x4f, 0x53, 0x10, 0x01, 0x2a, 0x24, 0x0a, 0x10, + 0x48, 0x42, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x07, 0x0a, 0x03, 0x52, 0x42, 0x43, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x42, 0x42, 0x41, + 0x10, 0x01, 0x2a, 0x33, 0x0a, 0x0a, 0x52, 0x42, 0x43, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, 0x49, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x45, + 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x45, 0x43, 0x48, 0x4f, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, + 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x02, 0x2a, 0x1f, 0x0a, 0x0a, 0x42, 0x42, 0x41, 0x4d, 0x73, + 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x56, 0x41, 0x4c, 0x10, 0x00, 0x12, + 0x07, 0x0a, 0x03, 0x41, 0x55, 0x58, 0x10, 0x01, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x75, 0x6d, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x2f, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4725,75 +3993,66 @@ func file_chain_proto_rawDescGZIP() []byte { return file_chain_proto_rawDescData } -var file_chain_proto_enumTypes = make([]protoimpl.EnumInfo, 20) -var file_chain_proto_msgTypes = make([]protoimpl.MessageInfo, 40) +var file_chain_proto_enumTypes = make([]protoimpl.EnumInfo, 18) +var file_chain_proto_msgTypes = make([]protoimpl.MessageInfo, 33) var file_chain_proto_goTypes = []interface{}{ - (PackageType)(0), // 0: quorum.pb.PackageType - (AnnounceType)(0), // 1: quorum.pb.AnnounceType - (ActionType)(0), // 2: quorum.pb.ActionType - (TrxStroageType)(0), // 3: quorum.pb.TrxStroageType - (TrxType)(0), // 4: quorum.pb.TrxType - (ChainConfigType)(0), // 5: quorum.pb.ChainConfigType - (TrxAuthMode)(0), // 6: quorum.pb.TrxAuthMode - (AuthListType)(0), // 7: quorum.pb.AuthListType - (AppConfigType)(0), // 8: quorum.pb.AppConfigType - (BftMsgType)(0), // 9: quorum.pb.BftMsgType - (CCMsgType)(0), // 10: quorum.pb.CCMsgType - (ChangeConsensusResult)(0), // 11: quorum.pb.ChangeConsensusResult - (SyncMsgType)(0), // 12: quorum.pb.SyncMsgType - (ReqBlkResult)(0), // 13: quorum.pb.ReqBlkResult - (BroadcastType)(0), // 14: quorum.pb.BroadcastType - (GroupEncryptType)(0), // 15: quorum.pb.GroupEncryptType - (GroupConsenseType)(0), // 16: quorum.pb.GroupConsenseType - (HBMsgPayloadType)(0), // 17: quorum.pb.HBMsgPayloadType - (RBCMsgType)(0), // 18: quorum.pb.RBCMsgType - (BBAMsgType)(0), // 19: quorum.pb.BBAMsgType - (*Package)(nil), // 20: quorum.pb.Package - (*PostItem)(nil), // 21: quorum.pb.PostItem - (*ProducerItem)(nil), // 22: quorum.pb.ProducerItem - (*UpdGroupUserItem)(nil), // 23: quorum.pb.UpdGroupUserItem - (*UserItem)(nil), // 24: quorum.pb.UserItem - (*AnnounceItem)(nil), // 25: quorum.pb.AnnounceItem - (*AnnounceContent)(nil), // 26: quorum.pb.AnnounceContent - (*ChainConfigItem)(nil), // 27: quorum.pb.ChainConfigItem - (*ChainSendTrxRuleListItem)(nil), // 28: quorum.pb.ChainSendTrxRuleListItem - (*SetTrxAuthModeItem)(nil), // 29: quorum.pb.SetTrxAuthModeItem - (*AppConfigItem)(nil), // 30: quorum.pb.AppConfigItem - (*ConsensusInfo)(nil), // 31: quorum.pb.ConsensusInfo - (*ForkItem)(nil), // 32: quorum.pb.ForkItem - (*Trx)(nil), // 33: quorum.pb.Trx - (*Block)(nil), // 34: quorum.pb.Block - (*BftMsg)(nil), // 35: quorum.pb.BftMsg - (*CCMsg)(nil), // 36: quorum.pb.CCMsg - (*ChangeConsensusReq)(nil), // 37: quorum.pb.ChangeConsensusReq - (*ChangeConsensusReqMsg)(nil), // 38: quorum.pb.ChangeConsensusReqMsg - (*ChangeConsensusResp)(nil), // 39: quorum.pb.ChangeConsensusResp - (*ChangeConsensusRespMsg)(nil), // 40: quorum.pb.ChangeConsensusRespMsg - (*ChangeConsensusProof)(nil), // 41: quorum.pb.ChangeConsensusProof - (*ChangeConsensusResultBundle)(nil), // 42: quorum.pb.ChangeConsensusResultBundle - (*SyncMsg)(nil), // 43: quorum.pb.SyncMsg - (*ReqBlock)(nil), // 44: quorum.pb.ReqBlock - (*ReqBlockResp)(nil), // 45: quorum.pb.ReqBlockResp - (*BlocksBundle)(nil), // 46: quorum.pb.BlocksBundle - (*BroadcastMsg)(nil), // 47: quorum.pb.BroadcastMsg - (*GroupItem)(nil), // 48: quorum.pb.GroupItem - (*GroupSeed)(nil), // 49: quorum.pb.GroupSeed - (*NodeSDKGroupItem)(nil), // 50: quorum.pb.NodeSDKGroupItem - (*HBTrxBundle)(nil), // 51: quorum.pb.HBTrxBundle - (*HBMsgv1)(nil), // 52: quorum.pb.HBMsgv1 - (*RBCMsg)(nil), // 53: quorum.pb.RBCMsg - (*InitPropose)(nil), // 54: quorum.pb.InitPropose - (*Echo)(nil), // 55: quorum.pb.Echo - (*Ready)(nil), // 56: quorum.pb.Ready - (*BBAMsg)(nil), // 57: quorum.pb.BBAMsg - (*Bval)(nil), // 58: quorum.pb.Bval - (*Aux)(nil), // 59: quorum.pb.Aux + (PackageType)(0), // 0: quorum.pb.PackageType + (AnnounceType)(0), // 1: quorum.pb.AnnounceType + (ActionType)(0), // 2: quorum.pb.ActionType + (TrxStroageType)(0), // 3: quorum.pb.TrxStroageType + (TrxType)(0), // 4: quorum.pb.TrxType + (ChainConfigType)(0), // 5: quorum.pb.ChainConfigType + (TrxAuthMode)(0), // 6: quorum.pb.TrxAuthMode + (AuthListType)(0), // 7: quorum.pb.AuthListType + (AppConfigType)(0), // 8: quorum.pb.AppConfigType + (BftMsgType)(0), // 9: quorum.pb.BftMsgType + (SyncMsgType)(0), // 10: quorum.pb.SyncMsgType + (ReqBlkResult)(0), // 11: quorum.pb.ReqBlkResult + (BroadcastType)(0), // 12: quorum.pb.BroadcastType + (GroupEncryptType)(0), // 13: quorum.pb.GroupEncryptType + (GroupConsenseType)(0), // 14: quorum.pb.GroupConsenseType + (HBMsgPayloadType)(0), // 15: quorum.pb.HBMsgPayloadType + (RBCMsgType)(0), // 16: quorum.pb.RBCMsgType + (BBAMsgType)(0), // 17: quorum.pb.BBAMsgType + (*Package)(nil), // 18: quorum.pb.Package + (*PostItem)(nil), // 19: quorum.pb.PostItem + (*ProducerItem)(nil), // 20: quorum.pb.ProducerItem + (*UpdGroupUserItem)(nil), // 21: quorum.pb.UpdGroupUserItem + (*UserItem)(nil), // 22: quorum.pb.UserItem + (*AnnounceItem)(nil), // 23: quorum.pb.AnnounceItem + (*AnnounceContent)(nil), // 24: quorum.pb.AnnounceContent + (*ChainConfigItem)(nil), // 25: quorum.pb.ChainConfigItem + (*ChainSendTrxRuleListItem)(nil), // 26: quorum.pb.ChainSendTrxRuleListItem + (*SetTrxAuthModeItem)(nil), // 27: quorum.pb.SetTrxAuthModeItem + (*AppConfigItem)(nil), // 28: quorum.pb.AppConfigItem + (*ConsensusInfo)(nil), // 29: quorum.pb.ConsensusInfo + (*ForkItem)(nil), // 30: quorum.pb.ForkItem + (*Trx)(nil), // 31: quorum.pb.Trx + (*Block)(nil), // 32: quorum.pb.Block + (*BftMsg)(nil), // 33: quorum.pb.BftMsg + (*SyncMsg)(nil), // 34: quorum.pb.SyncMsg + (*ReqBlock)(nil), // 35: quorum.pb.ReqBlock + (*ReqBlockResp)(nil), // 36: quorum.pb.ReqBlockResp + (*BlocksBundle)(nil), // 37: quorum.pb.BlocksBundle + (*BroadcastMsg)(nil), // 38: quorum.pb.BroadcastMsg + (*GroupItem)(nil), // 39: quorum.pb.GroupItem + (*GroupSeed)(nil), // 40: quorum.pb.GroupSeed + (*NodeSDKGroupItem)(nil), // 41: quorum.pb.NodeSDKGroupItem + (*HBTrxBundle)(nil), // 42: quorum.pb.HBTrxBundle + (*HBMsgv1)(nil), // 43: quorum.pb.HBMsgv1 + (*RBCMsg)(nil), // 44: quorum.pb.RBCMsg + (*InitPropose)(nil), // 45: quorum.pb.InitPropose + (*Echo)(nil), // 46: quorum.pb.Echo + (*Ready)(nil), // 47: quorum.pb.Ready + (*BBAMsg)(nil), // 48: quorum.pb.BBAMsg + (*Bval)(nil), // 49: quorum.pb.Bval + (*Aux)(nil), // 50: quorum.pb.Aux } var file_chain_proto_depIdxs = []int32{ 0, // 0: quorum.pb.Package.type:type_name -> quorum.pb.PackageType 2, // 1: quorum.pb.UpdGroupUserItem.Action:type_name -> quorum.pb.ActionType 2, // 2: quorum.pb.AnnounceItem.Action:type_name -> quorum.pb.ActionType - 26, // 3: quorum.pb.AnnounceItem.Content:type_name -> quorum.pb.AnnounceContent + 24, // 3: quorum.pb.AnnounceItem.Content:type_name -> quorum.pb.AnnounceContent 1, // 4: quorum.pb.AnnounceContent.Type:type_name -> quorum.pb.AnnounceType 5, // 5: quorum.pb.ChainConfigItem.Type:type_name -> quorum.pb.ChainConfigType 2, // 6: quorum.pb.ChainSendTrxRuleListItem.Action:type_name -> quorum.pb.ActionType @@ -4802,40 +4061,31 @@ var file_chain_proto_depIdxs = []int32{ 6, // 9: quorum.pb.SetTrxAuthModeItem.Mode:type_name -> quorum.pb.TrxAuthMode 2, // 10: quorum.pb.AppConfigItem.Action:type_name -> quorum.pb.ActionType 8, // 11: quorum.pb.AppConfigItem.Type:type_name -> quorum.pb.AppConfigType - 31, // 12: quorum.pb.ForkItem.Consensus:type_name -> quorum.pb.ConsensusInfo + 29, // 12: quorum.pb.ForkItem.Consensus:type_name -> quorum.pb.ConsensusInfo 4, // 13: quorum.pb.Trx.Type:type_name -> quorum.pb.TrxType 3, // 14: quorum.pb.Trx.StorageType:type_name -> quorum.pb.TrxStroageType - 33, // 15: quorum.pb.Block.Trxs:type_name -> quorum.pb.Trx - 31, // 16: quorum.pb.Block.Consensus:type_name -> quorum.pb.ConsensusInfo + 31, // 15: quorum.pb.Block.Trxs:type_name -> quorum.pb.Trx + 29, // 16: quorum.pb.Block.Consensus:type_name -> quorum.pb.ConsensusInfo 9, // 17: quorum.pb.BftMsg.Type:type_name -> quorum.pb.BftMsgType - 10, // 18: quorum.pb.CCMsg.Type:type_name -> quorum.pb.CCMsgType - 37, // 19: quorum.pb.ChangeConsensusReqMsg.Req:type_name -> quorum.pb.ChangeConsensusReq - 37, // 20: quorum.pb.ChangeConsensusResp.Req:type_name -> quorum.pb.ChangeConsensusReq - 39, // 21: quorum.pb.ChangeConsensusRespMsg.Resp:type_name -> quorum.pb.ChangeConsensusResp - 37, // 22: quorum.pb.ChangeConsensusProof.Req:type_name -> quorum.pb.ChangeConsensusReq - 39, // 23: quorum.pb.ChangeConsensusProof.Resp:type_name -> quorum.pb.ChangeConsensusResp - 37, // 24: quorum.pb.ChangeConsensusResultBundle.Req:type_name -> quorum.pb.ChangeConsensusReq - 39, // 25: quorum.pb.ChangeConsensusResultBundle.Resps:type_name -> quorum.pb.ChangeConsensusResp - 11, // 26: quorum.pb.ChangeConsensusResultBundle.Result:type_name -> quorum.pb.ChangeConsensusResult - 12, // 27: quorum.pb.SyncMsg.Type:type_name -> quorum.pb.SyncMsgType - 13, // 28: quorum.pb.ReqBlockResp.Result:type_name -> quorum.pb.ReqBlkResult - 46, // 29: quorum.pb.ReqBlockResp.Blocks:type_name -> quorum.pb.BlocksBundle - 34, // 30: quorum.pb.BlocksBundle.Blocks:type_name -> quorum.pb.Block - 14, // 31: quorum.pb.BroadcastMsg.Type:type_name -> quorum.pb.BroadcastType - 34, // 32: quorum.pb.GroupItem.GenesisBlock:type_name -> quorum.pb.Block - 15, // 33: quorum.pb.GroupItem.EncryptType:type_name -> quorum.pb.GroupEncryptType - 16, // 34: quorum.pb.GroupItem.ConsenseType:type_name -> quorum.pb.GroupConsenseType - 34, // 35: quorum.pb.GroupSeed.GenesisBlock:type_name -> quorum.pb.Block - 48, // 36: quorum.pb.NodeSDKGroupItem.Group:type_name -> quorum.pb.GroupItem - 33, // 37: quorum.pb.HBTrxBundle.Trxs:type_name -> quorum.pb.Trx - 17, // 38: quorum.pb.HBMsgv1.PayloadType:type_name -> quorum.pb.HBMsgPayloadType - 18, // 39: quorum.pb.RBCMsg.Type:type_name -> quorum.pb.RBCMsgType - 19, // 40: quorum.pb.BBAMsg.Type:type_name -> quorum.pb.BBAMsgType - 41, // [41:41] is the sub-list for method output_type - 41, // [41:41] is the sub-list for method input_type - 41, // [41:41] is the sub-list for extension type_name - 41, // [41:41] is the sub-list for extension extendee - 0, // [0:41] is the sub-list for field type_name + 10, // 18: quorum.pb.SyncMsg.Type:type_name -> quorum.pb.SyncMsgType + 11, // 19: quorum.pb.ReqBlockResp.Result:type_name -> quorum.pb.ReqBlkResult + 37, // 20: quorum.pb.ReqBlockResp.Blocks:type_name -> quorum.pb.BlocksBundle + 32, // 21: quorum.pb.BlocksBundle.Blocks:type_name -> quorum.pb.Block + 12, // 22: quorum.pb.BroadcastMsg.Type:type_name -> quorum.pb.BroadcastType + 32, // 23: quorum.pb.GroupItem.GenesisBlock:type_name -> quorum.pb.Block + 13, // 24: quorum.pb.GroupItem.EncryptType:type_name -> quorum.pb.GroupEncryptType + 14, // 25: quorum.pb.GroupItem.ConsenseType:type_name -> quorum.pb.GroupConsenseType + 32, // 26: quorum.pb.GroupSeed.GenesisBlock:type_name -> quorum.pb.Block + 39, // 27: quorum.pb.NodeSDKGroupItem.Group:type_name -> quorum.pb.GroupItem + 31, // 28: quorum.pb.HBTrxBundle.Trxs:type_name -> quorum.pb.Trx + 15, // 29: quorum.pb.HBMsgv1.PayloadType:type_name -> quorum.pb.HBMsgPayloadType + 16, // 30: quorum.pb.RBCMsg.Type:type_name -> quorum.pb.RBCMsgType + 17, // 31: quorum.pb.BBAMsg.Type:type_name -> quorum.pb.BBAMsgType + 32, // [32:32] is the sub-list for method output_type + 32, // [32:32] is the sub-list for method input_type + 32, // [32:32] is the sub-list for extension type_name + 32, // [32:32] is the sub-list for extension extendee + 0, // [0:32] is the sub-list for field type_name } func init() { file_chain_proto_init() } @@ -5037,90 +4287,6 @@ func file_chain_proto_init() { } } file_chain_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CCMsg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_chain_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeConsensusReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_chain_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeConsensusReqMsg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_chain_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeConsensusResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_chain_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeConsensusRespMsg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_chain_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeConsensusProof); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_chain_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeConsensusResultBundle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_chain_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SyncMsg); i { case 0: return &v.state @@ -5132,7 +4298,7 @@ func file_chain_proto_init() { return nil } } - file_chain_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_chain_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReqBlock); i { case 0: return &v.state @@ -5144,7 +4310,7 @@ func file_chain_proto_init() { return nil } } - file_chain_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_chain_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReqBlockResp); i { case 0: return &v.state @@ -5156,7 +4322,7 @@ func file_chain_proto_init() { return nil } } - file_chain_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_chain_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlocksBundle); i { case 0: return &v.state @@ -5168,7 +4334,7 @@ func file_chain_proto_init() { return nil } } - file_chain_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_chain_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BroadcastMsg); i { case 0: return &v.state @@ -5180,7 +4346,7 @@ func file_chain_proto_init() { return nil } } - file_chain_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_chain_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GroupItem); i { case 0: return &v.state @@ -5192,7 +4358,7 @@ func file_chain_proto_init() { return nil } } - file_chain_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_chain_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GroupSeed); i { case 0: return &v.state @@ -5204,7 +4370,7 @@ func file_chain_proto_init() { return nil } } - file_chain_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_chain_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NodeSDKGroupItem); i { case 0: return &v.state @@ -5216,7 +4382,7 @@ func file_chain_proto_init() { return nil } } - file_chain_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_chain_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HBTrxBundle); i { case 0: return &v.state @@ -5228,7 +4394,7 @@ func file_chain_proto_init() { return nil } } - file_chain_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_chain_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HBMsgv1); i { case 0: return &v.state @@ -5240,7 +4406,7 @@ func file_chain_proto_init() { return nil } } - file_chain_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_chain_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RBCMsg); i { case 0: return &v.state @@ -5252,7 +4418,7 @@ func file_chain_proto_init() { return nil } } - file_chain_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_chain_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InitPropose); i { case 0: return &v.state @@ -5264,7 +4430,7 @@ func file_chain_proto_init() { return nil } } - file_chain_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_chain_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Echo); i { case 0: return &v.state @@ -5276,7 +4442,7 @@ func file_chain_proto_init() { return nil } } - file_chain_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_chain_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Ready); i { case 0: return &v.state @@ -5288,7 +4454,7 @@ func file_chain_proto_init() { return nil } } - file_chain_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + file_chain_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BBAMsg); i { case 0: return &v.state @@ -5300,7 +4466,7 @@ func file_chain_proto_init() { return nil } } - file_chain_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + file_chain_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Bval); i { case 0: return &v.state @@ -5312,7 +4478,7 @@ func file_chain_proto_init() { return nil } } - file_chain_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + file_chain_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Aux); i { case 0: return &v.state @@ -5330,8 +4496,8 @@ func file_chain_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_chain_proto_rawDesc, - NumEnums: 20, - NumMessages: 40, + NumEnums: 18, + NumMessages: 33, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/pb/chain.proto b/pkg/pb/chain.proto index 6bc6178f..6e7ed281 100644 --- a/pkg/pb/chain.proto +++ b/pkg/pb/chain.proto @@ -6,9 +6,8 @@ enum PackageType { TRX = 0; BLOCK = 1; BFT_MSG = 2; - CC_MSG = 3; //Change Consensus - SYNC = 4; - BROADCAST_MSG = 5; + SYNC = 3; + BROADCAST_MSG = 4; } message Package { @@ -197,71 +196,6 @@ message BftMsg { bytes Data = 2; } -//CC_MSG -enum CCMsgType { - CHANGE_CONSENSUS_REQ = 0; // request change consensus - CC_PROOF_HB = 1; // HB msg for change consensus -} - -message CCMsg { - CCMsgType Type = 1; - bytes Data = 2; -} - -message ChangeConsensusReq { - string ReqId = 1; - string GroupId = 2; - uint64 Nonce = 3; - repeated string ProducerPubkeyList = 4; - uint64 AgreementTickLenInMs = 5; - uint64 AgreementTickCount = 6; - uint64 FromBlock = 7; - uint64 FromEpoch = 8; - uint64 EpochDuration = 9; - string Contract = 10; - string SenderPubkey = 12; - string Memo = 13; - bytes MsgHash = 14; - bytes SenderSign = 15; -} - -message ChangeConsensusReqMsg { - ChangeConsensusReq Req = 1; - uint64 ReqChangeConsensusRetryCnt = 2; -} - -message ChangeConsensusResp { - string RespId = 1; - string GroupId = 2; - ChangeConsensusReq Req = 3; - string SenderPubkey = 4; - string Memo = 5; - bytes MsgHash = 6; - bytes SenderSign = 7; -} - -message ChangeConsensusRespMsg { - ChangeConsensusResp Resp = 1; - uint64 ReqChangeConsensusRetryCnt = 2; -} - -message ChangeConsensusProof{ - uint64 ReqChangeConsensusRetryCnt = 1; - ChangeConsensusReq Req = 2; - ChangeConsensusResp Resp = 3; -} - -enum ChangeConsensusResult { - SUCCESS = 0; - FAIL = 1; -} - -message ChangeConsensusResultBundle{ - ChangeConsensusReq Req = 1; - repeated ChangeConsensusResp Resps = 2; - ChangeConsensusResult Result = 3; -} - //SYNC_MSG enum SyncMsgType { REQ_BLOCK = 0; // request block @@ -362,7 +296,6 @@ message NodeSDKGroupItem { //HB_MSG -//HB protocol is used for both change consensus and bft message HBTrxBundle { repeated Trx Trxs = 1; }