burrow: github.com/hyperledger/burrow/bcm Index | Files

package bcm

import "github.com/hyperledger/burrow/bcm"

Index

Package Files

bcm.pb.go block.go block_store.go blockchain.go

Variables

var (
    ErrInvalidLengthBcm        = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowBcm          = fmt.Errorf("proto: integer overflow")
    ErrUnexpectedEndOfGroupBcm = fmt.Errorf("proto: unexpected end of group")
)

type Block Uses

type Block struct {
    *types.Block
    // contains filtered or unexported fields
}

func NewBlock Uses

func NewBlock(txDecoder txs.Decoder, block *types.Block) *Block

func (*Block) Transactions Uses

func (b *Block) Transactions(iter func(*txs.Envelope) error) error

type BlockStore Uses

type BlockStore struct {
    state.BlockStoreRPC
    // contains filtered or unexported fields
}

func NewBlockExplorer Uses

func NewBlockExplorer(dbBackendType dbm.BackendType, dbDir string) *BlockStore

func NewBlockStore Uses

func NewBlockStore(blockStore state.BlockStoreRPC) *BlockStore

func (*BlockStore) Block Uses

func (bs *BlockStore) Block(height int64) (_ *Block, err error)

func (*BlockStore) BlockMeta Uses

func (bs *BlockStore) BlockMeta(height int64) (_ *types.BlockMeta, err error)

func (*BlockStore) Blocks Uses

func (bs *BlockStore) Blocks(start, end int64, iter func(*Block) error) error

Iterate over blocks between start (inclusive) and end (exclusive)

type Blockchain Uses

type Blockchain struct {
    sync.RWMutex
    // contains filtered or unexported fields
}

func LoadOrNewBlockchain Uses

func LoadOrNewBlockchain(db dbm.DB, genesisDoc *genesis.GenesisDoc, logger *logging.Logger) (_ *Blockchain, exists bool, _ error)

LoadOrNewBlockchain returns true if state already exists

func NewBlockchain Uses

func NewBlockchain(db dbm.DB, genesisDoc *genesis.GenesisDoc) *Blockchain

NewBlockchain returns a pointer to blockchain state initialised from genesis

func (*Blockchain) AppHashAfterLastBlock Uses

func (bc *Blockchain) AppHashAfterLastBlock() []byte

func (*Blockchain) BlockHash Uses

func (bc *Blockchain) BlockHash(height uint64) ([]byte, error)

func (*Blockchain) ChainID Uses

func (bc *Blockchain) ChainID() string

func (*Blockchain) CommitBlock Uses

func (bc *Blockchain) CommitBlock(blockTime time.Time, blockHash, appHash []byte) error

func (*Blockchain) CommitBlockAtHeight Uses

func (bc *Blockchain) CommitBlockAtHeight(blockTime time.Time, blockHash, appHash []byte, height uint64) error

func (*Blockchain) CommitWithAppHash Uses

func (bc *Blockchain) CommitWithAppHash(appHash []byte) error

func (*Blockchain) Encode Uses

func (bc *Blockchain) Encode() ([]byte, error)

func (*Blockchain) GenesisDoc Uses

func (bc *Blockchain) GenesisDoc() genesis.GenesisDoc

func (*Blockchain) GenesisHash Uses

func (bc *Blockchain) GenesisHash() []byte

func (*Blockchain) GetBlockHeader Uses

func (bc *Blockchain) GetBlockHeader(height uint64) (*types.Header, error)

GetBlockHeader returns the block header at any given height

func (*Blockchain) GetNumTxs Uses

func (bc *Blockchain) GetNumTxs(height uint64) (int, error)

GetNumTxs returns the number of transactions included in a block

func (*Blockchain) LastBlockHash Uses

func (bc *Blockchain) LastBlockHash() []byte

func (*Blockchain) LastBlockHeight Uses

func (bc *Blockchain) LastBlockHeight() uint64

func (*Blockchain) LastBlockTime Uses

func (bc *Blockchain) LastBlockTime() time.Time

func (*Blockchain) LastCommitDuration Uses

func (bc *Blockchain) LastCommitDuration() time.Duration

func (*Blockchain) LastCommitTime Uses

func (bc *Blockchain) LastCommitTime() time.Time

func (*Blockchain) SetBlockStore Uses

func (bc *Blockchain) SetBlockStore(bs *BlockStore)

type BlockchainInfo Uses

type BlockchainInfo interface {
    GenesisHash() []byte
    GenesisDoc() genesis.GenesisDoc
    ChainID() string
    LastBlockHeight() uint64
    LastBlockTime() time.Time
    LastCommitTime() time.Time
    LastCommitDuration() time.Duration
    LastBlockHash() []byte
    AppHashAfterLastBlock() []byte
    // BlockHash gets the hash at a height (or nil if no BlockStore mounted or block could not be found)
    BlockHash(height uint64) ([]byte, error)
    // GetBlockHeader returns the header at the specified height
    GetBlockHeader(blockNumber uint64) (*types.Header, error)
    // GetNumTxs returns the number of transactions included in a particular block
    GetNumTxs(blockNumber uint64) (int, error)
}

type PersistedState Uses

type PersistedState struct {
    AppHashAfterLastBlock github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,1,opt,name=AppHashAfterLastBlock,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"AppHashAfterLastBlock"`
    LastBlockTime         time.Time                                     `protobuf:"bytes,2,opt,name=LastBlockTime,proto3,stdtime" json:"LastBlockTime"`
    LastBlockHeight       uint64                                        `protobuf:"varint,3,opt,name=LastBlockHeight,proto3" json:"LastBlockHeight,omitempty"`
    GenesisHash           github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,4,opt,name=GenesisHash,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"GenesisHash"`
    XXX_NoUnkeyedLiteral  struct{}                                      `json:"-"`
    XXX_unrecognized      []byte                                        `json:"-"`
    XXX_sizecache         int32                                         `json:"-"`
}

func (*PersistedState) Descriptor Uses

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

func (*PersistedState) GetLastBlockHeight Uses

func (m *PersistedState) GetLastBlockHeight() uint64

func (*PersistedState) GetLastBlockTime Uses

func (m *PersistedState) GetLastBlockTime() time.Time

func (*PersistedState) Marshal Uses

func (m *PersistedState) Marshal() (dAtA []byte, err error)

func (*PersistedState) MarshalTo Uses

func (m *PersistedState) MarshalTo(dAtA []byte) (int, error)

func (*PersistedState) MarshalToSizedBuffer Uses

func (m *PersistedState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PersistedState) ProtoMessage Uses

func (*PersistedState) ProtoMessage()

func (*PersistedState) Reset Uses

func (m *PersistedState) Reset()

func (*PersistedState) Size Uses

func (m *PersistedState) Size() (n int)

func (*PersistedState) String Uses

func (m *PersistedState) String() string

func (*PersistedState) Unmarshal Uses

func (m *PersistedState) Unmarshal(dAtA []byte) error

func (*PersistedState) XXX_DiscardUnknown Uses

func (m *PersistedState) XXX_DiscardUnknown()

func (*PersistedState) XXX_Marshal Uses

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

func (*PersistedState) XXX_Merge Uses

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

func (*PersistedState) XXX_MessageName Uses

func (*PersistedState) XXX_MessageName() string

func (*PersistedState) XXX_Size Uses

func (m *PersistedState) XXX_Size() int

func (*PersistedState) XXX_Unmarshal Uses

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

type SyncInfo Uses

type SyncInfo struct {
    LatestBlockHeight uint64                                        `protobuf:"varint,1,opt,name=LatestBlockHeight,proto3" json:""`
    LatestBlockHash   github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,2,opt,name=LatestBlockHash,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"LatestBlockHash"`
    LatestAppHash     github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,3,opt,name=LatestAppHash,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"LatestAppHash"`
    // Timestamp of block as set by the block proposer
    LatestBlockTime time.Time `protobuf:"bytes,4,opt,name=LatestBlockTime,proto3,stdtime" json:"LatestBlockTime"`
    // Time at which we committed the last block
    LatestBlockSeenTime time.Time `protobuf:"bytes,5,opt,name=LatestBlockSeenTime,proto3,stdtime" json:"LatestBlockSeenTime"`
    // Time elapsed since last commit
    LatestBlockDuration  time.Duration `protobuf:"bytes,6,opt,name=LatestBlockDuration,proto3,stdduration" json:"LatestBlockDuration"`
    XXX_NoUnkeyedLiteral struct{}      `json:"-"`
    XXX_unrecognized     []byte        `json:"-"`
    XXX_sizecache        int32         `json:"-"`
}

func GetSyncInfo Uses

func GetSyncInfo(blockchain BlockchainInfo) *SyncInfo

func (*SyncInfo) Descriptor Uses

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

func (*SyncInfo) GetLatestBlockDuration Uses

func (m *SyncInfo) GetLatestBlockDuration() time.Duration

func (*SyncInfo) GetLatestBlockHeight Uses

func (m *SyncInfo) GetLatestBlockHeight() uint64

func (*SyncInfo) GetLatestBlockSeenTime Uses

func (m *SyncInfo) GetLatestBlockSeenTime() time.Time

func (*SyncInfo) GetLatestBlockTime Uses

func (m *SyncInfo) GetLatestBlockTime() time.Time

func (*SyncInfo) Marshal Uses

func (m *SyncInfo) Marshal() (dAtA []byte, err error)

func (*SyncInfo) MarshalTo Uses

func (m *SyncInfo) MarshalTo(dAtA []byte) (int, error)

func (*SyncInfo) MarshalToSizedBuffer Uses

func (m *SyncInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SyncInfo) ProtoMessage Uses

func (*SyncInfo) ProtoMessage()

func (*SyncInfo) Reset Uses

func (m *SyncInfo) Reset()

func (*SyncInfo) Size Uses

func (m *SyncInfo) Size() (n int)

func (*SyncInfo) String Uses

func (m *SyncInfo) String() string

func (*SyncInfo) Unmarshal Uses

func (m *SyncInfo) Unmarshal(dAtA []byte) error

func (*SyncInfo) XXX_DiscardUnknown Uses

func (m *SyncInfo) XXX_DiscardUnknown()

func (*SyncInfo) XXX_Marshal Uses

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

func (*SyncInfo) XXX_Merge Uses

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

func (*SyncInfo) XXX_MessageName Uses

func (*SyncInfo) XXX_MessageName() string

func (*SyncInfo) XXX_Size Uses

func (m *SyncInfo) XXX_Size() int

func (*SyncInfo) XXX_Unmarshal Uses

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

Package bcm imports 23 packages (graph) and is imported by 40 packages. Updated 2020-03-19. Refresh now. Tools for package owners.