fastchain

package
v0.0.0-...-1414968 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

func (*Nodes) GetNodes

func (m *Nodes) GetNodes() []*PbftNode

func (*Nodes) ProtoMessage

func (*Nodes) ProtoMessage()

func (*Nodes) Reset

func (m *Nodes) Reset()

func (*Nodes) String

func (m *Nodes) String() string

func (*Nodes) XXX_DiscardUnknown

func (m *Nodes) XXX_DiscardUnknown()

func (*Nodes) XXX_Marshal

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

func (*Nodes) XXX_Merge

func (dst *Nodes) XXX_Merge(src proto.Message)

func (*Nodes) XXX_Size

func (m *Nodes) XXX_Size() int

func (*Nodes) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*PbftBlock) GetHeader

func (m *PbftBlock) GetHeader() *PbftBlockHeader

func (*PbftBlock) GetSigns

func (m *PbftBlock) GetSigns() []string

func (*PbftBlock) GetTxns

func (m *PbftBlock) GetTxns() []*Transaction

func (*PbftBlock) ProtoMessage

func (*PbftBlock) ProtoMessage()

func (*PbftBlock) Reset

func (m *PbftBlock) Reset()

func (*PbftBlock) String

func (m *PbftBlock) String() string

func (*PbftBlock) XXX_DiscardUnknown

func (m *PbftBlock) XXX_DiscardUnknown()

func (*PbftBlock) XXX_Marshal

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

func (*PbftBlock) XXX_Merge

func (dst *PbftBlock) XXX_Merge(src proto.Message)

func (*PbftBlock) XXX_Size

func (m *PbftBlock) XXX_Size() int

func (*PbftBlock) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*PbftNode) GetAddr

func (m *PbftNode) GetAddr() string

func (*PbftNode) GetPrivkey

func (m *PbftNode) GetPrivkey() string

func (*PbftNode) GetPubkey

func (m *PbftNode) GetPubkey() string

func (*PbftNode) ProtoMessage

func (*PbftNode) ProtoMessage()

func (*PbftNode) Reset

func (m *PbftNode) Reset()

func (*PbftNode) String

func (m *PbftNode) String() string

func (*PbftNode) XXX_DiscardUnknown

func (m *PbftNode) XXX_DiscardUnknown()

func (*PbftNode) XXX_Marshal

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

func (*PbftNode) XXX_Merge

func (dst *PbftNode) XXX_Merge(src proto.Message)

func (*PbftNode) XXX_Size

func (m *PbftNode) XXX_Size() int

func (*PbftNode) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*Request) GetDig

func (m *Request) GetDig() []byte

func (*Request) GetInner

func (m *Request) GetInner() *Request_Inner

func (*Request) GetOuter

func (m *Request) GetOuter() []byte

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

func (*Request) XXX_DiscardUnknown

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal

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

func (*Request) XXX_Merge

func (dst *Request) XXX_Merge(src proto.Message)

func (*Request) XXX_Size

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*TrueChain) GetBlocks

func (m *TrueChain) GetBlocks() []*PbftBlock

func (*TrueChain) GetLastBlockHeader

func (m *TrueChain) GetLastBlockHeader() *PbftBlockHeader

func (*TrueChain) ProtoMessage

func (*TrueChain) ProtoMessage()

func (*TrueChain) Reset

func (m *TrueChain) Reset()

func (*TrueChain) String

func (m *TrueChain) String() string

func (*TrueChain) XXX_DiscardUnknown

func (m *TrueChain) XXX_DiscardUnknown()

func (*TrueChain) XXX_Marshal

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

func (*TrueChain) XXX_Merge

func (dst *TrueChain) XXX_Merge(src proto.Message)

func (*TrueChain) XXX_Size

func (m *TrueChain) XXX_Size() int

func (*TrueChain) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*TxnData) GetAccountNonce

func (m *TxnData) GetAccountNonce() uint64

func (*TxnData) GetAmount

func (m *TxnData) GetAmount() int64

func (*TxnData) GetGasLimit

func (m *TxnData) GetGasLimit() int64

func (*TxnData) GetHash

func (m *TxnData) GetHash() []byte

func (*TxnData) GetPayload

func (m *TxnData) GetPayload() []byte

func (*TxnData) GetPrice

func (m *TxnData) GetPrice() int64

func (*TxnData) GetRecipient

func (m *TxnData) GetRecipient() []byte

func (*TxnData) GetSignature

func (m *TxnData) GetSignature() []byte

func (*TxnData) ProtoMessage

func (*TxnData) ProtoMessage()

func (*TxnData) Reset

func (m *TxnData) Reset()

func (*TxnData) String

func (m *TxnData) String() string

func (*TxnData) XXX_DiscardUnknown

func (m *TxnData) XXX_DiscardUnknown()

func (*TxnData) XXX_Marshal

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

func (*TxnData) XXX_Merge

func (dst *TxnData) XXX_Merge(src proto.Message)

func (*TxnData) XXX_Size

func (m *TxnData) XXX_Size() int

func (*TxnData) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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