Documentation ¶
Index ¶
- func RegisterFastChainServer(s *grpc.Server, srv FastChainServer)
- type FastChainClient
- type FastChainServer
- type GenericResp
- func (*GenericResp) Descriptor() ([]byte, []int)
- func (m *GenericResp) GetMsg() string
- func (*GenericResp) ProtoMessage()
- func (m *GenericResp) Reset()
- func (m *GenericResp) String() string
- func (m *GenericResp) XXX_DiscardUnknown()
- func (m *GenericResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *GenericResp) XXX_Merge(src proto.Message)
- func (m *GenericResp) XXX_Size() int
- func (m *GenericResp) XXX_Unmarshal(b []byte) error
- type Nodes
- func (*Nodes) Descriptor() ([]byte, []int)
- func (m *Nodes) GetNodes() []*PbftNode
- func (*Nodes) ProtoMessage()
- func (m *Nodes) Reset()
- func (m *Nodes) String() string
- func (m *Nodes) XXX_DiscardUnknown()
- func (m *Nodes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Nodes) XXX_Merge(src proto.Message)
- func (m *Nodes) XXX_Size() int
- func (m *Nodes) XXX_Unmarshal(b []byte) error
- type PbftBlock
- func (*PbftBlock) Descriptor() ([]byte, []int)
- func (m *PbftBlock) GetHeader() *PbftBlockHeader
- func (m *PbftBlock) GetSigns() []string
- func (m *PbftBlock) GetTxns() []*Transaction
- func (*PbftBlock) ProtoMessage()
- func (m *PbftBlock) Reset()
- func (m *PbftBlock) String() string
- func (m *PbftBlock) XXX_DiscardUnknown()
- func (m *PbftBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *PbftBlock) XXX_Merge(src proto.Message)
- func (m *PbftBlock) XXX_Size() int
- func (m *PbftBlock) XXX_Unmarshal(b []byte) error
- type PbftBlockHeader
- func (*PbftBlockHeader) Descriptor() ([]byte, []int)
- func (m *PbftBlockHeader) GetGasLimit() int64
- func (m *PbftBlockHeader) GetGasUsed() int64
- func (m *PbftBlockHeader) GetNumber() int64
- func (m *PbftBlockHeader) GetParentHash() []byte
- func (m *PbftBlockHeader) GetTimestamp() int64
- func (m *PbftBlockHeader) GetTxnsHash() []byte
- func (*PbftBlockHeader) ProtoMessage()
- func (m *PbftBlockHeader) Reset()
- func (m *PbftBlockHeader) String() string
- func (m *PbftBlockHeader) XXX_DiscardUnknown()
- func (m *PbftBlockHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *PbftBlockHeader) XXX_Merge(src proto.Message)
- func (m *PbftBlockHeader) XXX_Size() int
- func (m *PbftBlockHeader) XXX_Unmarshal(b []byte) error
- type PbftNode
- func (*PbftNode) Descriptor() ([]byte, []int)
- func (m *PbftNode) GetAddr() string
- func (m *PbftNode) GetPrivkey() string
- func (m *PbftNode) GetPubkey() string
- func (*PbftNode) ProtoMessage()
- func (m *PbftNode) Reset()
- func (m *PbftNode) String() string
- func (m *PbftNode) XXX_DiscardUnknown()
- func (m *PbftNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *PbftNode) XXX_Merge(src proto.Message)
- func (m *PbftNode) XXX_Size() int
- func (m *PbftNode) XXX_Unmarshal(b []byte) error
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetDig() []byte
- func (m *Request) GetInner() *Request_Inner
- func (m *Request) GetOuter() []byte
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) String() string
- func (m *Request) XXX_DiscardUnknown()
- func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Request) XXX_Merge(src proto.Message)
- func (m *Request) XXX_Size() int
- func (m *Request) XXX_Unmarshal(b []byte) error
- type Request_Inner
- func (*Request_Inner) Descriptor() ([]byte, []int)
- func (m *Request_Inner) GetBlock() *PbftBlock
- func (m *Request_Inner) GetId() int32
- func (m *Request_Inner) GetSeq() int32
- func (m *Request_Inner) GetTimestamp() int64
- func (m *Request_Inner) GetType() int32
- func (m *Request_Inner) GetView() int32
- func (*Request_Inner) ProtoMessage()
- func (m *Request_Inner) Reset()
- func (m *Request_Inner) String() string
- func (m *Request_Inner) XXX_DiscardUnknown()
- func (m *Request_Inner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Request_Inner) XXX_Merge(src proto.Message)
- func (m *Request_Inner) XXX_Size() int
- func (m *Request_Inner) XXX_Unmarshal(b []byte) error
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)
- func (m *Transaction) GetData() *TxnData
- func (*Transaction) ProtoMessage()
- func (m *Transaction) Reset()
- func (m *Transaction) String() string
- func (m *Transaction) XXX_DiscardUnknown()
- func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Transaction) XXX_Merge(src proto.Message)
- func (m *Transaction) XXX_Size() int
- func (m *Transaction) XXX_Unmarshal(b []byte) error
- type TrueChain
- func (*TrueChain) Descriptor() ([]byte, []int)
- func (m *TrueChain) GetBlocks() []*PbftBlock
- func (m *TrueChain) GetLastBlockHeader() *PbftBlockHeader
- func (*TrueChain) ProtoMessage()
- func (m *TrueChain) Reset()
- func (m *TrueChain) String() string
- func (m *TrueChain) XXX_DiscardUnknown()
- func (m *TrueChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *TrueChain) XXX_Merge(src proto.Message)
- func (m *TrueChain) XXX_Size() int
- func (m *TrueChain) XXX_Unmarshal(b []byte) error
- type TxnData
- func (*TxnData) Descriptor() ([]byte, []int)
- func (m *TxnData) GetAccountNonce() uint64
- func (m *TxnData) GetAmount() int64
- func (m *TxnData) GetGasLimit() int64
- func (m *TxnData) GetHash() []byte
- func (m *TxnData) GetPayload() []byte
- func (m *TxnData) GetPrice() int64
- func (m *TxnData) GetRecipient() []byte
- func (m *TxnData) GetSignature() []byte
- func (*TxnData) ProtoMessage()
- func (m *TxnData) Reset()
- func (m *TxnData) String() string
- func (m *TxnData) XXX_DiscardUnknown()
- func (m *TxnData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *TxnData) XXX_Merge(src proto.Message)
- func (m *TxnData) XXX_Size() int
- func (m *TxnData) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterFastChainServer ¶
func RegisterFastChainServer(s *grpc.Server, srv FastChainServer)
Types ¶
type FastChainClient ¶
type FastChainClient interface { // Send new transaction to presumed leader node NewTxnRequest(ctx context.Context, in *Transaction, opts ...grpc.CallOption) (*GenericResp, error) }
FastChainClient is the client API for FastChain service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewFastChainClient ¶
func NewFastChainClient(cc *grpc.ClientConn) FastChainClient
type FastChainServer ¶
type FastChainServer interface { // Send new transaction to presumed leader node NewTxnRequest(context.Context, *Transaction) (*GenericResp, error) }
FastChainServer is the server API for FastChain service.
type GenericResp ¶
type GenericResp struct { Msg string `protobuf:"bytes,1,opt,name=Msg,proto3" json:"Msg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GenericResp) Descriptor ¶
func (*GenericResp) Descriptor() ([]byte, []int)
func (*GenericResp) GetMsg ¶
func (m *GenericResp) GetMsg() string
func (*GenericResp) ProtoMessage ¶
func (*GenericResp) ProtoMessage()
func (*GenericResp) Reset ¶
func (m *GenericResp) Reset()
func (*GenericResp) String ¶
func (m *GenericResp) String() string
func (*GenericResp) XXX_DiscardUnknown ¶
func (m *GenericResp) XXX_DiscardUnknown()
func (*GenericResp) XXX_Marshal ¶
func (m *GenericResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenericResp) XXX_Merge ¶
func (dst *GenericResp) XXX_Merge(src proto.Message)
func (*GenericResp) XXX_Size ¶
func (m *GenericResp) XXX_Size() int
func (*GenericResp) XXX_Unmarshal ¶
func (m *GenericResp) XXX_Unmarshal(b []byte) error
type Nodes ¶
type Nodes struct { Nodes []*PbftNode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Nodes) Descriptor ¶
func (*Nodes) ProtoMessage ¶
func (*Nodes) ProtoMessage()
func (*Nodes) XXX_DiscardUnknown ¶
func (m *Nodes) XXX_DiscardUnknown()
func (*Nodes) XXX_Marshal ¶
func (*Nodes) XXX_Unmarshal ¶
type PbftBlock ¶
type PbftBlock struct { Header *PbftBlockHeader `protobuf:"bytes,1,opt,name=Header,proto3" json:"Header,omitempty"` Txns []*Transaction `protobuf:"bytes,2,rep,name=Txns,proto3" json:"Txns,omitempty"` Signs []string `protobuf:"bytes,3,rep,name=Signs,proto3" json:"Signs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PbftBlock) Descriptor ¶
func (*PbftBlock) GetHeader ¶
func (m *PbftBlock) GetHeader() *PbftBlockHeader
func (*PbftBlock) GetTxns ¶
func (m *PbftBlock) GetTxns() []*Transaction
func (*PbftBlock) ProtoMessage ¶
func (*PbftBlock) ProtoMessage()
func (*PbftBlock) XXX_DiscardUnknown ¶
func (m *PbftBlock) XXX_DiscardUnknown()
func (*PbftBlock) XXX_Marshal ¶
func (*PbftBlock) XXX_Unmarshal ¶
type PbftBlockHeader ¶
type PbftBlockHeader struct { Number int64 `protobuf:"varint,1,opt,name=Number,proto3" json:"Number,omitempty"` GasLimit int64 `protobuf:"varint,2,opt,name=GasLimit,proto3" json:"GasLimit,omitempty"` GasUsed int64 `protobuf:"varint,3,opt,name=GasUsed,proto3" json:"GasUsed,omitempty"` Timestamp int64 `protobuf:"varint,4,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` ParentHash []byte `protobuf:"bytes,5,opt,name=ParentHash,proto3" json:"ParentHash,omitempty"` TxnsHash []byte `protobuf:"bytes,6,opt,name=TxnsHash,proto3" json:"TxnsHash,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PbftBlockHeader) Descriptor ¶
func (*PbftBlockHeader) Descriptor() ([]byte, []int)
func (*PbftBlockHeader) GetGasLimit ¶
func (m *PbftBlockHeader) GetGasLimit() int64
func (*PbftBlockHeader) GetGasUsed ¶
func (m *PbftBlockHeader) GetGasUsed() int64
func (*PbftBlockHeader) GetNumber ¶
func (m *PbftBlockHeader) GetNumber() int64
func (*PbftBlockHeader) GetParentHash ¶
func (m *PbftBlockHeader) GetParentHash() []byte
func (*PbftBlockHeader) GetTimestamp ¶
func (m *PbftBlockHeader) GetTimestamp() int64
func (*PbftBlockHeader) GetTxnsHash ¶
func (m *PbftBlockHeader) GetTxnsHash() []byte
func (*PbftBlockHeader) ProtoMessage ¶
func (*PbftBlockHeader) ProtoMessage()
func (*PbftBlockHeader) Reset ¶
func (m *PbftBlockHeader) Reset()
func (*PbftBlockHeader) String ¶
func (m *PbftBlockHeader) String() string
func (*PbftBlockHeader) XXX_DiscardUnknown ¶
func (m *PbftBlockHeader) XXX_DiscardUnknown()
func (*PbftBlockHeader) XXX_Marshal ¶
func (m *PbftBlockHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PbftBlockHeader) XXX_Merge ¶
func (dst *PbftBlockHeader) XXX_Merge(src proto.Message)
func (*PbftBlockHeader) XXX_Size ¶
func (m *PbftBlockHeader) XXX_Size() int
func (*PbftBlockHeader) XXX_Unmarshal ¶
func (m *PbftBlockHeader) XXX_Unmarshal(b []byte) error
type PbftNode ¶
type PbftNode struct { Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` Pubkey string `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` Privkey string `protobuf:"bytes,3,opt,name=privkey,proto3" json:"privkey,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PbftNode) Descriptor ¶
func (*PbftNode) GetPrivkey ¶
func (*PbftNode) ProtoMessage ¶
func (*PbftNode) ProtoMessage()
func (*PbftNode) XXX_DiscardUnknown ¶
func (m *PbftNode) XXX_DiscardUnknown()
func (*PbftNode) XXX_Marshal ¶
func (*PbftNode) XXX_Unmarshal ¶
type Request ¶
type Request struct { Inner *Request_Inner `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` Dig []byte `protobuf:"bytes,2,opt,name=dig,proto3" json:"dig,omitempty"` Outer []byte `protobuf:"bytes,3,opt,name=outer,proto3" json:"outer,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Request) Descriptor ¶
func (*Request) GetInner ¶
func (m *Request) GetInner() *Request_Inner
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) XXX_DiscardUnknown ¶
func (m *Request) XXX_DiscardUnknown()
func (*Request) XXX_Marshal ¶
func (*Request) XXX_Unmarshal ¶
type Request_Inner ¶
type Request_Inner struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Seq int32 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"` View int32 `protobuf:"varint,3,opt,name=view,proto3" json:"view,omitempty"` Type int32 `protobuf:"varint,4,opt,name=type,proto3" json:"type,omitempty"` Block *PbftBlock `protobuf:"bytes,5,opt,name=block,proto3" json:"block,omitempty"` Timestamp int64 `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Request_Inner) Descriptor ¶
func (*Request_Inner) Descriptor() ([]byte, []int)
func (*Request_Inner) GetBlock ¶
func (m *Request_Inner) GetBlock() *PbftBlock
func (*Request_Inner) GetId ¶
func (m *Request_Inner) GetId() int32
func (*Request_Inner) GetSeq ¶
func (m *Request_Inner) GetSeq() int32
func (*Request_Inner) GetTimestamp ¶
func (m *Request_Inner) GetTimestamp() int64
func (*Request_Inner) GetType ¶
func (m *Request_Inner) GetType() int32
func (*Request_Inner) GetView ¶
func (m *Request_Inner) GetView() int32
func (*Request_Inner) ProtoMessage ¶
func (*Request_Inner) ProtoMessage()
func (*Request_Inner) Reset ¶
func (m *Request_Inner) Reset()
func (*Request_Inner) String ¶
func (m *Request_Inner) String() string
func (*Request_Inner) XXX_DiscardUnknown ¶
func (m *Request_Inner) XXX_DiscardUnknown()
func (*Request_Inner) XXX_Marshal ¶
func (m *Request_Inner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Request_Inner) XXX_Merge ¶
func (dst *Request_Inner) XXX_Merge(src proto.Message)
func (*Request_Inner) XXX_Size ¶
func (m *Request_Inner) XXX_Size() int
func (*Request_Inner) XXX_Unmarshal ¶
func (m *Request_Inner) XXX_Unmarshal(b []byte) error
type Transaction ¶
type Transaction struct { Data *TxnData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Transaction) Descriptor ¶
func (*Transaction) Descriptor() ([]byte, []int)
func (*Transaction) GetData ¶
func (m *Transaction) GetData() *TxnData
func (*Transaction) ProtoMessage ¶
func (*Transaction) ProtoMessage()
func (*Transaction) Reset ¶
func (m *Transaction) Reset()
func (*Transaction) String ¶
func (m *Transaction) String() string
func (*Transaction) XXX_DiscardUnknown ¶
func (m *Transaction) XXX_DiscardUnknown()
func (*Transaction) XXX_Marshal ¶
func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Transaction) XXX_Merge ¶
func (dst *Transaction) XXX_Merge(src proto.Message)
func (*Transaction) XXX_Size ¶
func (m *Transaction) XXX_Size() int
func (*Transaction) XXX_Unmarshal ¶
func (m *Transaction) XXX_Unmarshal(b []byte) error
type TrueChain ¶
type TrueChain struct { Blocks []*PbftBlock `protobuf:"bytes,1,rep,name=Blocks,proto3" json:"Blocks,omitempty"` LastBlockHeader *PbftBlockHeader `protobuf:"bytes,2,opt,name=LastBlockHeader,proto3" json:"LastBlockHeader,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TrueChain) Descriptor ¶
func (*TrueChain) GetLastBlockHeader ¶
func (m *TrueChain) GetLastBlockHeader() *PbftBlockHeader
func (*TrueChain) ProtoMessage ¶
func (*TrueChain) ProtoMessage()
func (*TrueChain) XXX_DiscardUnknown ¶
func (m *TrueChain) XXX_DiscardUnknown()
func (*TrueChain) XXX_Marshal ¶
func (*TrueChain) XXX_Unmarshal ¶
type TxnData ¶
type TxnData struct { AccountNonce uint64 `protobuf:"varint,1,opt,name=AccountNonce,proto3" json:"AccountNonce,omitempty"` Price int64 `protobuf:"varint,2,opt,name=Price,proto3" json:"Price,omitempty"` GasLimit int64 `protobuf:"varint,3,opt,name=GasLimit,proto3" json:"GasLimit,omitempty"` Recipient []byte `protobuf:"bytes,4,opt,name=Recipient,proto3" json:"Recipient,omitempty"` Amount int64 `protobuf:"varint,5,opt,name=Amount,proto3" json:"Amount,omitempty"` Payload []byte `protobuf:"bytes,6,opt,name=Payload,proto3" json:"Payload,omitempty"` Signature []byte `protobuf:"bytes,7,opt,name=Signature,proto3" json:"Signature,omitempty"` Hash []byte `protobuf:"bytes,8,opt,name=Hash,proto3" json:"Hash,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TxnData) Descriptor ¶
func (*TxnData) GetAccountNonce ¶
func (*TxnData) GetGasLimit ¶
func (*TxnData) GetPayload ¶
func (*TxnData) GetRecipient ¶
func (*TxnData) GetSignature ¶
func (*TxnData) ProtoMessage ¶
func (*TxnData) ProtoMessage()
func (*TxnData) XXX_DiscardUnknown ¶
func (m *TxnData) XXX_DiscardUnknown()
func (*TxnData) XXX_Marshal ¶
func (*TxnData) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.