Documentation ¶
Index ¶
- Variables
- func VnodeServiceStart(inconfigfile string)
- type Backend
- type DecodedScsRegisterMsg
- type VnodeServer
- func (s *VnodeServer) AccountInfo(ctx context.Context, in *pb.AccountInfoRequest) (*pb.AccountInfoReply, error)
- func (s *VnodeServer) Address() common.Address
- func (s *VnodeServer) ChainInfo(ctx context.Context, in *pb.ChainInfoRequest) (*pb.ChainInfoReply, error)
- func (s *VnodeServer) Close()
- func (s *VnodeServer) CloseScsServer(scsId string)
- func (s *VnodeServer) DownloadBlock(ctx context.Context, in *pb.DownloadBlockRequest) (*pb.DownloadBlockReply, error)
- func (s *VnodeServer) GetBlockNumber() uint64
- func (s *VnodeServer) GetSCSRole(contractAddress common.Address, nodeAddress common.Address) params.ScsKind
- func (s *VnodeServer) GetScsPushMsgChan() chan pb.ScsPushMsg
- func (s *VnodeServer) GetScsPushResChan() chan pb.ScsPushMsg
- func (s *VnodeServer) GetScsRegChan() chan pb.ScsPushMsg
- func (s *VnodeServer) NotifyMsgRunState(hash common.Hash) bool
- func (s *VnodeServer) PingScsServers(scsid string, blknum *big.Int) error
- func (s *VnodeServer) RemoteCall(ctx context.Context, in *pb.RemoteCallRequest) (*pb.RemoteCallReply, error)
- func (s *VnodeServer) ScbPublicCall(ctx context.Context, in *pb.ScbPublicCallRequest) (*pb.ScbPublicCallReply, error)
- func (s *VnodeServer) ScsPush(stream pb.Vnode_ScsPushServer) error
- func (s *VnodeServer) ScsService() bool
- func (s *VnodeServer) ServiceCfg() string
- func (s *VnodeServer) ShowToPublic() bool
- func (s *VnodeServer) UpdateScsServerList(shakeInfo *types.ShakeInfo) error
- func (s *VnodeServer) UploadBlock(ctx context.Context, in *pb.UploadBlockRequest) (*pb.UploadBlockReply, error)
- func (s *VnodeServer) VnodeIP() string
Constants ¶
This section is empty.
Variables ¶
var ( Server = &VnodeServer{} Grequestid uint32 )
Functions ¶
func VnodeServiceStart ¶
func VnodeServiceStart(inconfigfile string)
VnodeServiceStart -- run grpc server
Types ¶
type DecodedScsRegisterMsg ¶
type VnodeServer ¶
type VnodeServer struct { Config *config.Configuration ScsPushMsgChan chan pb.ScsPushMsg ScsPushResChan chan pb.ScsPushMsg ScsRegChan chan pb.ScsPushMsg ScsServerList *map[string]*types.ScsServerConnection PingTickers map[string]*time.Ticker // contains filtered or unexported fields }
VNODE server data structure
func NewScsService ¶
func NewScsService(db mcdb.Database, syncdb mcdb.Database, bc *core.BlockChain, mn Backend, ctx *node.ServiceContext) *VnodeServer
func (*VnodeServer) AccountInfo ¶
func (s *VnodeServer) AccountInfo(ctx context.Context, in *pb.AccountInfoRequest) (*pb.AccountInfoReply, error)
AccountInfo:
func (*VnodeServer) Address ¶
func (s *VnodeServer) Address() common.Address
Address, RPC API, returns the VNODE beneficial address
func (*VnodeServer) ChainInfo ¶
func (s *VnodeServer) ChainInfo(ctx context.Context, in *pb.ChainInfoRequest) (*pb.ChainInfoReply, error)
ChainInfo: MicroChain info?
func (*VnodeServer) CloseScsServer ¶
func (s *VnodeServer) CloseScsServer(scsId string)
func (*VnodeServer) DownloadBlock ¶
func (s *VnodeServer) DownloadBlock(ctx context.Context, in *pb.DownloadBlockRequest) (*pb.DownloadBlockReply, error)
DownloadBlock - Download the block from vnode so that the SCS are able to retrieve the missing block data
func (*VnodeServer) GetBlockNumber ¶
func (s *VnodeServer) GetBlockNumber() uint64
func (*VnodeServer) GetSCSRole ¶
func (s *VnodeServer) GetSCSRole(contractAddress common.Address, nodeAddress common.Address) params.ScsKind
GetSCSRole: return the connected SCS info.
func (*VnodeServer) GetScsPushMsgChan ¶
func (s *VnodeServer) GetScsPushMsgChan() chan pb.ScsPushMsg
func (*VnodeServer) GetScsPushResChan ¶
func (s *VnodeServer) GetScsPushResChan() chan pb.ScsPushMsg
func (*VnodeServer) GetScsRegChan ¶
func (s *VnodeServer) GetScsRegChan() chan pb.ScsPushMsg
func (*VnodeServer) NotifyMsgRunState ¶
func (s *VnodeServer) NotifyMsgRunState(hash common.Hash) bool
func (*VnodeServer) PingScsServers ¶
func (s *VnodeServer) PingScsServers(scsid string, blknum *big.Int) error
func (*VnodeServer) RemoteCall ¶
func (s *VnodeServer) RemoteCall(ctx context.Context, in *pb.RemoteCallRequest) (*pb.RemoteCallReply, error)
func (*VnodeServer) ScbPublicCall ¶
func (s *VnodeServer) ScbPublicCall(ctx context.Context, in *pb.ScbPublicCallRequest) (*pb.ScbPublicCallReply, error)
func (*VnodeServer) ScsPush ¶
func (s *VnodeServer) ScsPush(stream pb.Vnode_ScsPushServer) error
func (*VnodeServer) ScsService ¶
func (s *VnodeServer) ScsService() bool
SCSService, API functions, returns if the SCSService is open (= true) or not (=false), indication if the Vnode is providing SCS service or not.
func (*VnodeServer) ServiceCfg ¶
func (s *VnodeServer) ServiceCfg() string
ServiceCfg, RPC API, returns the service info "localhost:50062",
func (*VnodeServer) ShowToPublic ¶
func (s *VnodeServer) ShowToPublic() bool
ShowToPublic, RPC API, returns: true - the VNODE can be listed on the net scan, false - the VNODE won't be listed.
func (*VnodeServer) UpdateScsServerList ¶
func (s *VnodeServer) UpdateScsServerList(shakeInfo *types.ShakeInfo) error
func (*VnodeServer) UploadBlock ¶
func (s *VnodeServer) UploadBlock(ctx context.Context, in *pb.UploadBlockRequest) (*pb.UploadBlockReply, error)
UploadBlock - upload receiving the block from SCS, save it to local disk for persistency
func (*VnodeServer) VnodeIP ¶
func (s *VnodeServer) VnodeIP() string
VnodeIP: RPC API, returns the VNODEIP from the input vnodeconfig.json