types

package
v6.1.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2019 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// TyLogParacrossCommit commit log key
	TyLogParacrossCommit = 650
	// TyLogParacrossCommitDone commit down key
	TyLogParacrossCommitDone = 651
	// record 和 commit 不一样, 对应高度完成共识后收到commit 交易
	// 这个交易就不参与共识, 只做记录
	// TyLogParacrossCommitRecord commit record key
	TyLogParacrossCommitRecord = 652
	// TyLogParaAssetTransfer asset transfer log key
	TyLogParaAssetTransfer = 653
	// TyLogParaAssetWithdraw asset withdraw log key
	TyLogParaAssetWithdraw = 654
	//在平行链上保存节点参与共识的数据
	// TyLogParacrossMiner miner log key
	TyLogParacrossMiner = 655
	// TyLogParaAssetDeposit asset deposit log key
	TyLogParaAssetDeposit = 656
)

paracross 执行器的日志类型

View Source
const (
	// ParacrossActionCommit paracross consensus commit action
	ParacrossActionCommit = iota
	// ParacrossActionMiner paracross consensus miner action
	ParacrossActionMiner
	// ParacrossActionTransfer paracross asset transfer action
	ParacrossActionTransfer
	// ParacrossActionWithdraw paracross asset withdraw action
	ParacrossActionWithdraw
	// ParacrossActionTransferToExec asset transfer to exec
	ParacrossActionTransferToExec
)

action type

View Source
const (
	// ParacrossActionAssetTransfer paracross asset transfer key
	ParacrossActionAssetTransfer = iota + paraCrossTransferActionTypeStart
	// ParacrossActionAssetWithdraw paracross asset withdraw key
	ParacrossActionAssetWithdraw
)
View Source
const (
	// ParacrossStatusCommiting commit status
	ParacrossStatusCommiting = iota
	// ParacrossStatusCommitDone commit done status
	ParacrossStatusCommitDone
)

status

Variables

View Source
var (
	// ErrInvalidTitle invalid commit msg title
	ErrInvalidTitle = errors.New("ErrInvalidTitle")
	// ErrTitleNotExist commit msg title not exist
	ErrTitleNotExist = errors.New("ErrTitleNotExist")
	// ErrNodeNotForTheTitle the node not match with title
	ErrNodeNotForTheTitle = errors.New("ErrNodeNotForTheTitle")
	// ErrParaBlockHashNoMatch block hash not match with before
	ErrParaBlockHashNoMatch = errors.New("ErrParaBlockHashNoMatch")
	// ErrParaMinerBaseIndex miner base index not 0
	ErrParaMinerBaseIndex = errors.New("ErrParaMinerBaseIndex")
	// ErrParaMinerTxType the 0 tx is not miner tx
	ErrParaMinerTxType = errors.New("ErrParaMinerTxType")
	// ErrParaEmptyMinerTx block no miner tx
	ErrParaEmptyMinerTx = errors.New("ErrParaEmptyMinerTx")
	// ErrParaMinerExecErr miner tx exec error
	ErrParaMinerExecErr = errors.New("ErrParaMinerExecErr")
	// ErrParaWaitingNewSeq para waiting main node new seq coming
	ErrParaWaitingNewSeq = errors.New("ErrParaWaitingNewSeq")
	// ErrParaCurHashNotMatch para curr main hash not match with pre, main node may switched
	ErrParaCurHashNotMatch = errors.New("ErrParaCurHashNotMatch")
)
View Source
var (
	// ParacrossActionCommitStr Commit string
	ParacrossActionCommitStr = string("Commit")

	// ParacrossActionAssetTransferStr asset transfer key
	ParacrossActionAssetTransferStr = paracrossTransferPerfix + string("AssetTransfer")
	// ParacrossActionAssetWithdrawStr asset withdraw key
	ParacrossActionAssetWithdrawStr = paracrossTransferPerfix + string("AssetWithdraw")
	// ParacrossActionTransferStr trasfer key
	ParacrossActionTransferStr = paracrossTransferPerfix + string("Transfer")
	// ParacrossActionTransferToExecStr transfer to exec key
	ParacrossActionTransferToExecStr = paracrossTransferPerfix + string("TransferToExec")
	// ParacrossActionWithdrawStr withdraw key
	ParacrossActionWithdrawStr = paracrossTransferPerfix + string("Withdraw")
)
View Source
var (
	// ParaX paracross exec name
	ParaX = "paracross"
)

Functions

func CalcMinerHeightKey

func CalcMinerHeightKey(title string, height int64) []byte

CalcMinerHeightKey get miner key

func CreateRawAssetTransferTx

func CreateRawAssetTransferTx(param *types.CreateTx) (*types.Transaction, error)

CreateRawAssetTransferTx create asset transfer tx

func CreateRawCommitTx4MainChain

func CreateRawCommitTx4MainChain(status *ParacrossNodeStatus, name string, fee int64) (*types.Transaction, error)

CreateRawCommitTx4MainChain create commit tx to main chain

func CreateRawMinerTx

func CreateRawMinerTx(status *ParacrossNodeStatus) (*types.Transaction, error)

CreateRawMinerTx create miner tx

func GetExecName

func GetExecName() string

GetExecName get para exec name

func RegisterParacrossServer

func RegisterParacrossServer(s *grpc.Server, srv ParacrossServer)

Types

type ParacrossAction

type ParacrossAction struct {
	// Types that are valid to be assigned to Value:
	//	*ParacrossAction_Commit
	//	*ParacrossAction_Miner
	//	*ParacrossAction_AssetTransfer
	//	*ParacrossAction_AssetWithdraw
	//	*ParacrossAction_Transfer
	//	*ParacrossAction_Withdraw
	//	*ParacrossAction_TransferToExec
	Value                isParacrossAction_Value `protobuf_oneof:"value"`
	Ty                   int32                   `protobuf:"varint,2,opt,name=ty,proto3" json:"ty,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

func (*ParacrossAction) Descriptor

func (*ParacrossAction) Descriptor() ([]byte, []int)

func (*ParacrossAction) GetAssetTransfer

func (m *ParacrossAction) GetAssetTransfer() *types.AssetsTransfer

func (*ParacrossAction) GetAssetWithdraw

func (m *ParacrossAction) GetAssetWithdraw() *types.AssetsWithdraw

func (*ParacrossAction) GetCommit

func (m *ParacrossAction) GetCommit() *ParacrossCommitAction

func (*ParacrossAction) GetMiner

func (m *ParacrossAction) GetMiner() *ParacrossMinerAction

func (*ParacrossAction) GetTransfer

func (m *ParacrossAction) GetTransfer() *types.AssetsTransfer

func (*ParacrossAction) GetTransferToExec

func (m *ParacrossAction) GetTransferToExec() *types.AssetsTransferToExec

func (*ParacrossAction) GetTy

func (m *ParacrossAction) GetTy() int32

func (*ParacrossAction) GetValue

func (m *ParacrossAction) GetValue() isParacrossAction_Value

func (*ParacrossAction) GetWithdraw

func (m *ParacrossAction) GetWithdraw() *types.AssetsWithdraw

func (*ParacrossAction) ProtoMessage

func (*ParacrossAction) ProtoMessage()

func (*ParacrossAction) Reset

func (m *ParacrossAction) Reset()

func (*ParacrossAction) String

func (m *ParacrossAction) String() string

func (*ParacrossAction) XXX_DiscardUnknown

func (m *ParacrossAction) XXX_DiscardUnknown()

func (*ParacrossAction) XXX_Marshal

func (m *ParacrossAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ParacrossAction) XXX_Merge

func (m *ParacrossAction) XXX_Merge(src proto.Message)

func (*ParacrossAction) XXX_OneofFuncs

func (*ParacrossAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*ParacrossAction) XXX_Size

func (m *ParacrossAction) XXX_Size() int

func (*ParacrossAction) XXX_Unmarshal

func (m *ParacrossAction) XXX_Unmarshal(b []byte) error

type ParacrossAction_AssetTransfer

type ParacrossAction_AssetTransfer struct {
	AssetTransfer *types.AssetsTransfer `protobuf:"bytes,4,opt,name=assetTransfer,proto3,oneof"`
}

type ParacrossAction_AssetWithdraw

type ParacrossAction_AssetWithdraw struct {
	AssetWithdraw *types.AssetsWithdraw `protobuf:"bytes,5,opt,name=assetWithdraw,proto3,oneof"`
}

type ParacrossAction_Commit

type ParacrossAction_Commit struct {
	Commit *ParacrossCommitAction `protobuf:"bytes,1,opt,name=commit,proto3,oneof"`
}

type ParacrossAction_Miner

type ParacrossAction_Miner struct {
	Miner *ParacrossMinerAction `protobuf:"bytes,3,opt,name=miner,proto3,oneof"`
}

type ParacrossAction_Transfer

type ParacrossAction_Transfer struct {
	Transfer *types.AssetsTransfer `protobuf:"bytes,6,opt,name=transfer,proto3,oneof"`
}

type ParacrossAction_TransferToExec

type ParacrossAction_TransferToExec struct {
	TransferToExec *types.AssetsTransferToExec `protobuf:"bytes,8,opt,name=transferToExec,proto3,oneof"`
}

type ParacrossAction_Withdraw

type ParacrossAction_Withdraw struct {
	Withdraw *types.AssetsWithdraw `protobuf:"bytes,7,opt,name=withdraw,proto3,oneof"`
}

type ParacrossAsset

type ParacrossAsset struct {
	// input
	From       string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	To         string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
	IsWithdraw bool   `protobuf:"varint,3,opt,name=isWithdraw,proto3" json:"isWithdraw,omitempty"`
	TxHash     []byte `protobuf:"bytes,4,opt,name=txHash,proto3" json:"txHash,omitempty"`
	Amount     int64  `protobuf:"varint,5,opt,name=amount,proto3" json:"amount,omitempty"`
	Exec       string `protobuf:"bytes,6,opt,name=exec,proto3" json:"exec,omitempty"`
	Symbol     string `protobuf:"bytes,7,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// 主链部分
	Height int64 `protobuf:"varint,10,opt,name=height,proto3" json:"height,omitempty"`
	// 平行链部分
	CommitDoneHeight     int64    `protobuf:"varint,21,opt,name=commitDoneHeight,proto3" json:"commitDoneHeight,omitempty"`
	ParaHeight           int64    `protobuf:"varint,22,opt,name=paraHeight,proto3" json:"paraHeight,omitempty"`
	Success              bool     `protobuf:"varint,23,opt,name=success,proto3" json:"success,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

跨链转账相关

func (*ParacrossAsset) Descriptor

func (*ParacrossAsset) Descriptor() ([]byte, []int)

func (*ParacrossAsset) GetAmount

func (m *ParacrossAsset) GetAmount() int64

func (*ParacrossAsset) GetCommitDoneHeight

func (m *ParacrossAsset) GetCommitDoneHeight() int64

func (*ParacrossAsset) GetExec

func (m *ParacrossAsset) GetExec() string

func (*ParacrossAsset) GetFrom

func (m *ParacrossAsset) GetFrom() string

func (*ParacrossAsset) GetHeight

func (m *ParacrossAsset) GetHeight() int64

func (*ParacrossAsset) GetIsWithdraw

func (m *ParacrossAsset) GetIsWithdraw() bool

func (*ParacrossAsset) GetParaHeight

func (m *ParacrossAsset) GetParaHeight() int64

func (*ParacrossAsset) GetSuccess

func (m *ParacrossAsset) GetSuccess() bool

func (*ParacrossAsset) GetSymbol

func (m *ParacrossAsset) GetSymbol() string

func (*ParacrossAsset) GetTo

func (m *ParacrossAsset) GetTo() string

func (*ParacrossAsset) GetTxHash

func (m *ParacrossAsset) GetTxHash() []byte

func (*ParacrossAsset) ProtoMessage

func (*ParacrossAsset) ProtoMessage()

func (*ParacrossAsset) Reset

func (m *ParacrossAsset) Reset()

func (*ParacrossAsset) String

func (m *ParacrossAsset) String() string

func (*ParacrossAsset) XXX_DiscardUnknown

func (m *ParacrossAsset) XXX_DiscardUnknown()

func (*ParacrossAsset) XXX_Marshal

func (m *ParacrossAsset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ParacrossAsset) XXX_Merge

func (m *ParacrossAsset) XXX_Merge(src proto.Message)

func (*ParacrossAsset) XXX_Size

func (m *ParacrossAsset) XXX_Size() int

func (*ParacrossAsset) XXX_Unmarshal

func (m *ParacrossAsset) XXX_Unmarshal(b []byte) error

type ParacrossClient

type ParacrossClient interface {
	GetTitle(ctx context.Context, in *types.ReqString, opts ...grpc.CallOption) (*ParacrossStatus, error)
	ListTitles(ctx context.Context, in *types.ReqNil, opts ...grpc.CallOption) (*RespParacrossTitles, error)
	GetTitleHeight(ctx context.Context, in *ReqParacrossTitleHeight, opts ...grpc.CallOption) (*ReceiptParacrossDone, error)
	GetAssetTxResult(ctx context.Context, in *types.ReqHash, opts ...grpc.CallOption) (*ParacrossAsset, error)
	IsSync(ctx context.Context, in *types.ReqNil, opts ...grpc.CallOption) (*types.IsCaughtUp, error)
}

ParacrossClient is the client API for Paracross service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewParacrossClient

func NewParacrossClient(cc *grpc.ClientConn) ParacrossClient

type ParacrossCommitAction

type ParacrossCommitAction struct {
	Status               *ParacrossNodeStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*ParacrossCommitAction) Descriptor

func (*ParacrossCommitAction) Descriptor() ([]byte, []int)

func (*ParacrossCommitAction) GetStatus

func (*ParacrossCommitAction) ProtoMessage

func (*ParacrossCommitAction) ProtoMessage()

func (*ParacrossCommitAction) Reset

func (m *ParacrossCommitAction) Reset()

func (*ParacrossCommitAction) String

func (m *ParacrossCommitAction) String() string

func (*ParacrossCommitAction) XXX_DiscardUnknown

func (m *ParacrossCommitAction) XXX_DiscardUnknown()

func (*ParacrossCommitAction) XXX_Marshal

func (m *ParacrossCommitAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ParacrossCommitAction) XXX_Merge

func (m *ParacrossCommitAction) XXX_Merge(src proto.Message)

func (*ParacrossCommitAction) XXX_Size

func (m *ParacrossCommitAction) XXX_Size() int

func (*ParacrossCommitAction) XXX_Unmarshal

func (m *ParacrossCommitAction) XXX_Unmarshal(b []byte) error

type ParacrossHeightStatus

type ParacrossHeightStatus struct {
	// ing, done
	Status               int32                   `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	Title                string                  `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Height               int64                   `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
	Details              *ParacrossStatusDetails `protobuf:"bytes,4,opt,name=details,proto3" json:"details,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

func (*ParacrossHeightStatus) Descriptor

func (*ParacrossHeightStatus) Descriptor() ([]byte, []int)

func (*ParacrossHeightStatus) GetDetails

func (*ParacrossHeightStatus) GetHeight

func (m *ParacrossHeightStatus) GetHeight() int64

func (*ParacrossHeightStatus) GetStatus

func (m *ParacrossHeightStatus) GetStatus() int32

func (*ParacrossHeightStatus) GetTitle

func (m *ParacrossHeightStatus) GetTitle() string

func (*ParacrossHeightStatus) ProtoMessage

func (*ParacrossHeightStatus) ProtoMessage()

func (*ParacrossHeightStatus) Reset

func (m *ParacrossHeightStatus) Reset()

func (*ParacrossHeightStatus) String

func (m *ParacrossHeightStatus) String() string

func (*ParacrossHeightStatus) XXX_DiscardUnknown

func (m *ParacrossHeightStatus) XXX_DiscardUnknown()

func (*ParacrossHeightStatus) XXX_Marshal

func (m *ParacrossHeightStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ParacrossHeightStatus) XXX_Merge

func (m *ParacrossHeightStatus) XXX_Merge(src proto.Message)

func (*ParacrossHeightStatus) XXX_Size

func (m *ParacrossHeightStatus) XXX_Size() int

func (*ParacrossHeightStatus) XXX_Unmarshal

func (m *ParacrossHeightStatus) XXX_Unmarshal(b []byte) error

type ParacrossMinerAction

type ParacrossMinerAction struct {
	Status               *ParacrossNodeStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*ParacrossMinerAction) Descriptor

func (*ParacrossMinerAction) Descriptor() ([]byte, []int)

func (*ParacrossMinerAction) GetStatus

func (m *ParacrossMinerAction) GetStatus() *ParacrossNodeStatus

func (*ParacrossMinerAction) ProtoMessage

func (*ParacrossMinerAction) ProtoMessage()

func (*ParacrossMinerAction) Reset

func (m *ParacrossMinerAction) Reset()

func (*ParacrossMinerAction) String

func (m *ParacrossMinerAction) String() string

func (*ParacrossMinerAction) XXX_DiscardUnknown

func (m *ParacrossMinerAction) XXX_DiscardUnknown()

func (*ParacrossMinerAction) XXX_Marshal

func (m *ParacrossMinerAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ParacrossMinerAction) XXX_Merge

func (m *ParacrossMinerAction) XXX_Merge(src proto.Message)

func (*ParacrossMinerAction) XXX_Size

func (m *ParacrossMinerAction) XXX_Size() int

func (*ParacrossMinerAction) XXX_Unmarshal

func (m *ParacrossMinerAction) XXX_Unmarshal(b []byte) error

type ParacrossNodeStatus

type ParacrossNodeStatus struct {
	MainBlockHash        []byte   `protobuf:"bytes,1,opt,name=mainBlockHash,proto3" json:"mainBlockHash,omitempty"`
	MainBlockHeight      int64    `protobuf:"varint,2,opt,name=mainBlockHeight,proto3" json:"mainBlockHeight,omitempty"`
	Title                string   `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
	Height               int64    `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"`
	PreBlockHash         []byte   `protobuf:"bytes,5,opt,name=preBlockHash,proto3" json:"preBlockHash,omitempty"`
	BlockHash            []byte   `protobuf:"bytes,6,opt,name=blockHash,proto3" json:"blockHash,omitempty"`
	PreStateHash         []byte   `protobuf:"bytes,7,opt,name=preStateHash,proto3" json:"preStateHash,omitempty"`
	StateHash            []byte   `protobuf:"bytes,8,opt,name=stateHash,proto3" json:"stateHash,omitempty"`
	TxCounts             uint32   `protobuf:"varint,9,opt,name=txCounts,proto3" json:"txCounts,omitempty"`
	TxResult             []byte   `protobuf:"bytes,10,opt,name=txResult,proto3" json:"txResult,omitempty"`
	TxHashs              [][]byte `protobuf:"bytes,11,rep,name=txHashs,proto3" json:"txHashs,omitempty"`
	CrossTxResult        []byte   `protobuf:"bytes,12,opt,name=crossTxResult,proto3" json:"crossTxResult,omitempty"`
	CrossTxHashs         [][]byte `protobuf:"bytes,13,rep,name=crossTxHashs,proto3" json:"crossTxHashs,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

action

func (*ParacrossNodeStatus) Descriptor

func (*ParacrossNodeStatus) Descriptor() ([]byte, []int)

func (*ParacrossNodeStatus) GetBlockHash

func (m *ParacrossNodeStatus) GetBlockHash() []byte

func (*ParacrossNodeStatus) GetCrossTxHashs

func (m *ParacrossNodeStatus) GetCrossTxHashs() [][]byte

func (*ParacrossNodeStatus) GetCrossTxResult

func (m *ParacrossNodeStatus) GetCrossTxResult() []byte

func (*ParacrossNodeStatus) GetHeight

func (m *ParacrossNodeStatus) GetHeight() int64

func (*ParacrossNodeStatus) GetMainBlockHash

func (m *ParacrossNodeStatus) GetMainBlockHash() []byte

func (*ParacrossNodeStatus) GetMainBlockHeight

func (m *ParacrossNodeStatus) GetMainBlockHeight() int64

func (*ParacrossNodeStatus) GetPreBlockHash

func (m *ParacrossNodeStatus) GetPreBlockHash() []byte

func (*ParacrossNodeStatus) GetPreStateHash

func (m *ParacrossNodeStatus) GetPreStateHash() []byte

func (*ParacrossNodeStatus) GetStateHash

func (m *ParacrossNodeStatus) GetStateHash() []byte

func (*ParacrossNodeStatus) GetTitle

func (m *ParacrossNodeStatus) GetTitle() string

func (*ParacrossNodeStatus) GetTxCounts

func (m *ParacrossNodeStatus) GetTxCounts() uint32

func (*ParacrossNodeStatus) GetTxHashs

func (m *ParacrossNodeStatus) GetTxHashs() [][]byte

func (*ParacrossNodeStatus) GetTxResult

func (m *ParacrossNodeStatus) GetTxResult() []byte

func (*ParacrossNodeStatus) ProtoMessage

func (*ParacrossNodeStatus) ProtoMessage()

func (*ParacrossNodeStatus) Reset

func (m *ParacrossNodeStatus) Reset()

func (*ParacrossNodeStatus) String

func (m *ParacrossNodeStatus) String() string

func (*ParacrossNodeStatus) XXX_DiscardUnknown

func (m *ParacrossNodeStatus) XXX_DiscardUnknown()

func (*ParacrossNodeStatus) XXX_Marshal

func (m *ParacrossNodeStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ParacrossNodeStatus) XXX_Merge

func (m *ParacrossNodeStatus) XXX_Merge(src proto.Message)

func (*ParacrossNodeStatus) XXX_Size

func (m *ParacrossNodeStatus) XXX_Size() int

func (*ParacrossNodeStatus) XXX_Unmarshal

func (m *ParacrossNodeStatus) XXX_Unmarshal(b []byte) error

type ParacrossServer

ParacrossServer is the server API for Paracross service.

type ParacrossStatus

type ParacrossStatus struct {
	Title                string   `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Height               int64    `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
	BlockHash            []byte   `protobuf:"bytes,3,opt,name=blockHash,proto3" json:"blockHash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ParacrossStatus) Descriptor

func (*ParacrossStatus) Descriptor() ([]byte, []int)

func (*ParacrossStatus) GetBlockHash

func (m *ParacrossStatus) GetBlockHash() []byte

func (*ParacrossStatus) GetHeight

func (m *ParacrossStatus) GetHeight() int64

func (*ParacrossStatus) GetTitle

func (m *ParacrossStatus) GetTitle() string

func (*ParacrossStatus) ProtoMessage

func (*ParacrossStatus) ProtoMessage()

func (*ParacrossStatus) Reset

func (m *ParacrossStatus) Reset()

func (*ParacrossStatus) String

func (m *ParacrossStatus) String() string

func (*ParacrossStatus) XXX_DiscardUnknown

func (m *ParacrossStatus) XXX_DiscardUnknown()

func (*ParacrossStatus) XXX_Marshal

func (m *ParacrossStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ParacrossStatus) XXX_Merge

func (m *ParacrossStatus) XXX_Merge(src proto.Message)

func (*ParacrossStatus) XXX_Size

func (m *ParacrossStatus) XXX_Size() int

func (*ParacrossStatus) XXX_Unmarshal

func (m *ParacrossStatus) XXX_Unmarshal(b []byte) error

type ParacrossStatusDetails

type ParacrossStatusDetails struct {
	Addrs                []string `protobuf:"bytes,1,rep,name=addrs,proto3" json:"addrs,omitempty"`
	BlockHash            [][]byte `protobuf:"bytes,2,rep,name=blockHash,proto3" json:"blockHash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

stateDB

func (*ParacrossStatusDetails) Descriptor

func (*ParacrossStatusDetails) Descriptor() ([]byte, []int)

func (*ParacrossStatusDetails) GetAddrs

func (m *ParacrossStatusDetails) GetAddrs() []string

func (*ParacrossStatusDetails) GetBlockHash

func (m *ParacrossStatusDetails) GetBlockHash() [][]byte

func (*ParacrossStatusDetails) ProtoMessage

func (*ParacrossStatusDetails) ProtoMessage()

func (*ParacrossStatusDetails) Reset

func (m *ParacrossStatusDetails) Reset()

func (*ParacrossStatusDetails) String

func (m *ParacrossStatusDetails) String() string

func (*ParacrossStatusDetails) XXX_DiscardUnknown

func (m *ParacrossStatusDetails) XXX_DiscardUnknown()

func (*ParacrossStatusDetails) XXX_Marshal

func (m *ParacrossStatusDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ParacrossStatusDetails) XXX_Merge

func (m *ParacrossStatusDetails) XXX_Merge(src proto.Message)

func (*ParacrossStatusDetails) XXX_Size

func (m *ParacrossStatusDetails) XXX_Size() int

func (*ParacrossStatusDetails) XXX_Unmarshal

func (m *ParacrossStatusDetails) XXX_Unmarshal(b []byte) error

type ParacrossTx

type ParacrossTx struct {
	TxHash               string   `protobuf:"bytes,1,opt,name=txHash,proto3" json:"txHash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

LocalDB title-height-addr : txHash

func (*ParacrossTx) Descriptor

func (*ParacrossTx) Descriptor() ([]byte, []int)

func (*ParacrossTx) GetTxHash

func (m *ParacrossTx) GetTxHash() string

func (*ParacrossTx) ProtoMessage

func (*ParacrossTx) ProtoMessage()

func (*ParacrossTx) Reset

func (m *ParacrossTx) Reset()

func (*ParacrossTx) String

func (m *ParacrossTx) String() string

func (*ParacrossTx) XXX_DiscardUnknown

func (m *ParacrossTx) XXX_DiscardUnknown()

func (*ParacrossTx) XXX_Marshal

func (m *ParacrossTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ParacrossTx) XXX_Merge

func (m *ParacrossTx) XXX_Merge(src proto.Message)

func (*ParacrossTx) XXX_Size

func (m *ParacrossTx) XXX_Size() int

func (*ParacrossTx) XXX_Unmarshal

func (m *ParacrossTx) XXX_Unmarshal(b []byte) error

type ParacrossType

type ParacrossType struct {
	types.ExecTypeBase
}

ParacrossType base paracross type

func NewType

func NewType() *ParacrossType

NewType get paracross type

func (ParacrossType) CreateRawTransferTx

func (p ParacrossType) CreateRawTransferTx(action string, param json.RawMessage) (*types.Transaction, error)

CreateRawTransferTx create paracross asset transfer tx with transfer and withdraw

func (ParacrossType) CreateTx

func (p ParacrossType) CreateTx(action string, message json.RawMessage) (*types.Transaction, error)

CreateTx paracross create tx by different action

func (*ParacrossType) GetLogMap

func (p *ParacrossType) GetLogMap() map[int64]*types.LogInfo

GetLogMap get receipt log map

func (*ParacrossType) GetName

func (p *ParacrossType) GetName() string

GetName 获取执行器名称

func (*ParacrossType) GetPayload

func (p *ParacrossType) GetPayload() types.Message

GetPayload paracross get action payload

func (*ParacrossType) GetTypeMap

func (p *ParacrossType) GetTypeMap() map[string]int32

GetTypeMap get action type

type ReceiptParacrossCommit

type ReceiptParacrossCommit struct {
	Addr                 string                 `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	Status               *ParacrossNodeStatus   `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	Prev                 *ParacrossHeightStatus `protobuf:"bytes,3,opt,name=prev,proto3" json:"prev,omitempty"`
	Current              *ParacrossHeightStatus `protobuf:"bytes,4,opt,name=current,proto3" json:"current,omitempty"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

logs

func (*ReceiptParacrossCommit) Descriptor

func (*ReceiptParacrossCommit) Descriptor() ([]byte, []int)

func (*ReceiptParacrossCommit) GetAddr

func (m *ReceiptParacrossCommit) GetAddr() string

func (*ReceiptParacrossCommit) GetCurrent

func (*ReceiptParacrossCommit) GetPrev

func (*ReceiptParacrossCommit) GetStatus

func (*ReceiptParacrossCommit) ProtoMessage

func (*ReceiptParacrossCommit) ProtoMessage()

func (*ReceiptParacrossCommit) Reset

func (m *ReceiptParacrossCommit) Reset()

func (*ReceiptParacrossCommit) String

func (m *ReceiptParacrossCommit) String() string

func (*ReceiptParacrossCommit) XXX_DiscardUnknown

func (m *ReceiptParacrossCommit) XXX_DiscardUnknown()

func (*ReceiptParacrossCommit) XXX_Marshal

func (m *ReceiptParacrossCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReceiptParacrossCommit) XXX_Merge

func (m *ReceiptParacrossCommit) XXX_Merge(src proto.Message)

func (*ReceiptParacrossCommit) XXX_Size

func (m *ReceiptParacrossCommit) XXX_Size() int

func (*ReceiptParacrossCommit) XXX_Unmarshal

func (m *ReceiptParacrossCommit) XXX_Unmarshal(b []byte) error

type ReceiptParacrossDone

type ReceiptParacrossDone struct {
	TotalNodes           int32    `protobuf:"varint,1,opt,name=totalNodes,proto3" json:"totalNodes,omitempty"`
	TotalCommit          int32    `protobuf:"varint,2,opt,name=totalCommit,proto3" json:"totalCommit,omitempty"`
	MostSameCommit       int32    `protobuf:"varint,3,opt,name=mostSameCommit,proto3" json:"mostSameCommit,omitempty"`
	Title                string   `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`
	Height               int64    `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"`
	StateHash            []byte   `protobuf:"bytes,6,opt,name=stateHash,proto3" json:"stateHash,omitempty"`
	TxCounts             uint32   `protobuf:"varint,7,opt,name=txCounts,proto3" json:"txCounts,omitempty"`
	TxResult             []byte   `protobuf:"bytes,8,opt,name=txResult,proto3" json:"txResult,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReceiptParacrossDone) Descriptor

func (*ReceiptParacrossDone) Descriptor() ([]byte, []int)

func (*ReceiptParacrossDone) GetHeight

func (m *ReceiptParacrossDone) GetHeight() int64

func (*ReceiptParacrossDone) GetMostSameCommit

func (m *ReceiptParacrossDone) GetMostSameCommit() int32

func (*ReceiptParacrossDone) GetStateHash

func (m *ReceiptParacrossDone) GetStateHash() []byte

func (*ReceiptParacrossDone) GetTitle

func (m *ReceiptParacrossDone) GetTitle() string

func (*ReceiptParacrossDone) GetTotalCommit

func (m *ReceiptParacrossDone) GetTotalCommit() int32

func (*ReceiptParacrossDone) GetTotalNodes

func (m *ReceiptParacrossDone) GetTotalNodes() int32

func (*ReceiptParacrossDone) GetTxCounts

func (m *ReceiptParacrossDone) GetTxCounts() uint32

func (*ReceiptParacrossDone) GetTxResult

func (m *ReceiptParacrossDone) GetTxResult() []byte

func (*ReceiptParacrossDone) ProtoMessage

func (*ReceiptParacrossDone) ProtoMessage()

func (*ReceiptParacrossDone) Reset

func (m *ReceiptParacrossDone) Reset()

func (*ReceiptParacrossDone) String

func (m *ReceiptParacrossDone) String() string

func (*ReceiptParacrossDone) XXX_DiscardUnknown

func (m *ReceiptParacrossDone) XXX_DiscardUnknown()

func (*ReceiptParacrossDone) XXX_Marshal

func (m *ReceiptParacrossDone) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReceiptParacrossDone) XXX_Merge

func (m *ReceiptParacrossDone) XXX_Merge(src proto.Message)

func (*ReceiptParacrossDone) XXX_Size

func (m *ReceiptParacrossDone) XXX_Size() int

func (*ReceiptParacrossDone) XXX_Unmarshal

func (m *ReceiptParacrossDone) XXX_Unmarshal(b []byte) error

type ReceiptParacrossMiner

type ReceiptParacrossMiner struct {
	Status               *ParacrossNodeStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*ReceiptParacrossMiner) Descriptor

func (*ReceiptParacrossMiner) Descriptor() ([]byte, []int)

func (*ReceiptParacrossMiner) GetStatus

func (*ReceiptParacrossMiner) ProtoMessage

func (*ReceiptParacrossMiner) ProtoMessage()

func (*ReceiptParacrossMiner) Reset

func (m *ReceiptParacrossMiner) Reset()

func (*ReceiptParacrossMiner) String

func (m *ReceiptParacrossMiner) String() string

func (*ReceiptParacrossMiner) XXX_DiscardUnknown

func (m *ReceiptParacrossMiner) XXX_DiscardUnknown()

func (*ReceiptParacrossMiner) XXX_Marshal

func (m *ReceiptParacrossMiner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReceiptParacrossMiner) XXX_Merge

func (m *ReceiptParacrossMiner) XXX_Merge(src proto.Message)

func (*ReceiptParacrossMiner) XXX_Size

func (m *ReceiptParacrossMiner) XXX_Size() int

func (*ReceiptParacrossMiner) XXX_Unmarshal

func (m *ReceiptParacrossMiner) XXX_Unmarshal(b []byte) error

type ReceiptParacrossRecord

type ReceiptParacrossRecord struct {
	Addr                 string               `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	Status               *ParacrossNodeStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*ReceiptParacrossRecord) Descriptor

func (*ReceiptParacrossRecord) Descriptor() ([]byte, []int)

func (*ReceiptParacrossRecord) GetAddr

func (m *ReceiptParacrossRecord) GetAddr() string

func (*ReceiptParacrossRecord) GetStatus

func (*ReceiptParacrossRecord) ProtoMessage

func (*ReceiptParacrossRecord) ProtoMessage()

func (*ReceiptParacrossRecord) Reset

func (m *ReceiptParacrossRecord) Reset()

func (*ReceiptParacrossRecord) String

func (m *ReceiptParacrossRecord) String() string

func (*ReceiptParacrossRecord) XXX_DiscardUnknown

func (m *ReceiptParacrossRecord) XXX_DiscardUnknown()

func (*ReceiptParacrossRecord) XXX_Marshal

func (m *ReceiptParacrossRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReceiptParacrossRecord) XXX_Merge

func (m *ReceiptParacrossRecord) XXX_Merge(src proto.Message)

func (*ReceiptParacrossRecord) XXX_Size

func (m *ReceiptParacrossRecord) XXX_Size() int

func (*ReceiptParacrossRecord) XXX_Unmarshal

func (m *ReceiptParacrossRecord) XXX_Unmarshal(b []byte) error

type ReqParacrossTitleHeight

type ReqParacrossTitleHeight struct {
	Title                string   `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Height               int64    `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

query

func (*ReqParacrossTitleHeight) Descriptor

func (*ReqParacrossTitleHeight) Descriptor() ([]byte, []int)

func (*ReqParacrossTitleHeight) GetHeight

func (m *ReqParacrossTitleHeight) GetHeight() int64

func (*ReqParacrossTitleHeight) GetTitle

func (m *ReqParacrossTitleHeight) GetTitle() string

func (*ReqParacrossTitleHeight) ProtoMessage

func (*ReqParacrossTitleHeight) ProtoMessage()

func (*ReqParacrossTitleHeight) Reset

func (m *ReqParacrossTitleHeight) Reset()

func (*ReqParacrossTitleHeight) String

func (m *ReqParacrossTitleHeight) String() string

func (*ReqParacrossTitleHeight) XXX_DiscardUnknown

func (m *ReqParacrossTitleHeight) XXX_DiscardUnknown()

func (*ReqParacrossTitleHeight) XXX_Marshal

func (m *ReqParacrossTitleHeight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReqParacrossTitleHeight) XXX_Merge

func (m *ReqParacrossTitleHeight) XXX_Merge(src proto.Message)

func (*ReqParacrossTitleHeight) XXX_Size

func (m *ReqParacrossTitleHeight) XXX_Size() int

func (*ReqParacrossTitleHeight) XXX_Unmarshal

func (m *ReqParacrossTitleHeight) XXX_Unmarshal(b []byte) error

type RespParacrossTitles

type RespParacrossTitles struct {
	Titles               []*ReceiptParacrossDone `protobuf:"bytes,1,rep,name=titles,proto3" json:"titles,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

func (*RespParacrossTitles) Descriptor

func (*RespParacrossTitles) Descriptor() ([]byte, []int)

func (*RespParacrossTitles) GetTitles

func (m *RespParacrossTitles) GetTitles() []*ReceiptParacrossDone

func (*RespParacrossTitles) ProtoMessage

func (*RespParacrossTitles) ProtoMessage()

func (*RespParacrossTitles) Reset

func (m *RespParacrossTitles) Reset()

func (*RespParacrossTitles) String

func (m *RespParacrossTitles) String() string

func (*RespParacrossTitles) XXX_DiscardUnknown

func (m *RespParacrossTitles) XXX_DiscardUnknown()

func (*RespParacrossTitles) XXX_Marshal

func (m *RespParacrossTitles) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RespParacrossTitles) XXX_Merge

func (m *RespParacrossTitles) XXX_Merge(src proto.Message)

func (*RespParacrossTitles) XXX_Size

func (m *RespParacrossTitles) XXX_Size() int

func (*RespParacrossTitles) XXX_Unmarshal

func (m *RespParacrossTitles) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL