Documentation ¶
Overview ¶
Copyright Xilinx Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
Index ¶
- Constants
- Variables
- func CheckMessageData(block *cb.Block) (ret bool)
- func CheckPeerStructure(addr string) (ret bool)
- func ExtractEnvelope(block *cb.Block, index int) (*cb.Envelope, error)
- func GetEnvelopeFromBlock(data []byte) (*cb.Envelope, error)
- func InitConfig()
- func IsConfigBlock(block *cb.Block) (bool, error)
- func SendBlock(addr string, block *cb.Block)
- func SendBlockHeader(addr string, data []byte, pos int, length int, transactionLen []int)
- func SendBlockMeta(addr string, data []byte, pos int, length int)
- func SendToHardware(ctx context.Context, block *cb.Block)
- func SendTransaction(addr string, data []byte, pos int, length int)
- func UnmarshalChaincodeHeaderExtension(hdrExtension []byte) (*peer.ChaincodeHeaderExtension, error)
- func UnmarshalChaincodeID(bytes []byte) (*peer.ChaincodeID, error)
- func UnmarshalChannelHeader(bytes []byte) (*cb.ChannelHeader, error)
- func UnmarshalPayload(encoded []byte) (*cb.Payload, error)
- type Annotation
- type AnnotationInfo
- type AnnotationLocator
- type AnnotationPointer
- type BcmSession
- type BcmTransportHeader
- type CertificateInfo
- type HardwarePeer
- type Organization
Constants ¶
const ANNOTATION_DATA_TYPE_BLOCKHEADER byte = 0x10
annotations for block header message
const ANNOTATION_DATA_TYPE_BLOCKMETADATA byte = 0x12
const ANNOTATION_DATA_TYPE_BLOCK_ID byte = 0x13
const ANNOTATION_DATA_TYPE_CACHE_CA byte = 0x03
const ANNOTATION_DATA_TYPE_CACHE_DATA byte = 0x01
annotations for cache update message
const ANNOTATION_DATA_TYPE_CACHE_NAME byte = 0x02
const ANNOTATION_DATA_TYPE_CHAINCODE_NAME byte = 0x23
const ANNOTATION_DATA_TYPE_CHANNEL_NAME byte = 0x21
const ANNOTATION_DATA_TYPE_CONTRACT_INPUT byte = 0x28
const ANNOTATION_DATA_TYPE_CONTRACT_NAME byte = 0x27
const ANNOTATION_DATA_TYPE_CREATER_CA byte = 0x24
const ANNOTATION_DATA_TYPE_ENDORSER byte = 0x2b
const ANNOTATION_DATA_TYPE_ENDORSER_ACTION byte = 0x29
const ANNOTATION_DATA_TYPE_ENDORSER_CA byte = 0x2c
const ANNOTATION_DATA_TYPE_ENDORSER_SIG byte = 0x2d
const ANNOTATION_DATA_TYPE_MASK byte = 0x7F
const ANNOTATION_DATA_TYPE_ORDERER_CA byte = 0x40
annotations for block metata
const ANNOTATION_DATA_TYPE_ORDERER_SIG byte = 0x41
const ANNOTATION_DATA_TYPE_RW_SET byte = 0x2a
const ANNOTATION_DATA_TYPE_TRANSACTION byte = 0x11
const ANNOTATION_DATA_TYPE_TX_ACTION byte = 0x25
const ANNOTATION_DATA_TYPE_TX_CA byte = 0x26
const ANNOTATION_DATA_TYPE_TX_ID byte = 0x22
const ANNOTATION_DATA_TYPE_TX_SIG byte = 0x2e
const ANNOTATION_DATA_TYPE_TX_START byte = 0x20
annotations for transaction
const ANNOTATION_TYPE_LOCATOR byte = 0x80
const ANNOTATION_TYPE_MASK byte = 0x80
annotation mask
const ANNOTATION_TYPE_POINTER byte = 0x00
annotation type
const MAX_ENDORSER_NUM int = 8
Variables ¶
var BcmSessionMap map[string]BcmSession
BcmSessionMap records IP to blockchain machine protocol session relation
var BlockHeaderAnnotationNumber int = len(blockHeaderAnnotationInfoList)
var BlockMetadataAnnotationNumber int = len(blockMetadataAnnotationInfoList)
var BlockTransactionAnnotationNumber int = len(blockTransactionAnnotationInfoList) - 1 + MAX_ENDORSER_NUM
var CacheUpdateAnnotationNumber int = len(blockCacheUpdateAnnotationInfoList)
var CertificateCache map[string]CertificateInfo
var CertificateIdCache map[int]CertificateInfo
Functions ¶
func CheckMessageData ¶
CheckMessageData checks block message format, return false if the block is not supported
func CheckPeerStructure ¶
CheckPeerStructure checks if peer is a hardware based peer
func ExtractEnvelope ¶
ExtractEnvelope retrieves the requested envelope from a given block and unmarshals it hyperledger/fabric@v2.0/protoutil/commonutils.go
func GetEnvelopeFromBlock ¶
GetEnvelopeFromBlock gets an envelope from a block's Data field. hyperledger/fabric@v2.0/protoutil/txutils.go
func InitConfig ¶
func InitConfig()
func IsConfigBlock ¶
IsConfigBlock validates whenever given block contains configuration update transaction hyperledger/fabric@v2.0/protoutil/commonutils.go
func SendBlockHeader ¶
SendBlockHeader prepares packet data based on block header and transaction information then send to target addres
func SendBlockMeta ¶
SendBlockMeta prepares packet data based on block metadata and send to target addres
func SendToHardware ¶
SendToHardware broadcasts a raw block message to hardware based peers
func SendTransaction ¶
SendTransaction prepares packet data based on transaction and send to target addres
func UnmarshalChaincodeHeaderExtension ¶
func UnmarshalChaincodeHeaderExtension(hdrExtension []byte) (*peer.ChaincodeHeaderExtension, error)
UnmarshalChaincodeHeaderExtension unmarshals bytes to a ChaincodeHeaderExtension hyperledger/fabric@v2.0/protoutil/unmarshalers.go
func UnmarshalChaincodeID ¶
func UnmarshalChaincodeID(bytes []byte) (*peer.ChaincodeID, error)
UnmarshalChaincodeID unmarshals bytes to a ChaincodeID hyperledger/fabric@v2.0/protoutil/unmarshalers.go
func UnmarshalChannelHeader ¶
func UnmarshalChannelHeader(bytes []byte) (*cb.ChannelHeader, error)
UnmarshalChannelHeader unmarshals bytes to a ChannelHeader hyperledger/fabric@v2.0/protoutil/unmarshalers.go
Types ¶
type Annotation ¶
type Annotation struct {
// contains filtered or unexported fields
}
type AnnotationInfo ¶
type AnnotationInfo struct {
// contains filtered or unexported fields
}
type AnnotationLocator ¶
type AnnotationLocator struct {
// contains filtered or unexported fields
}
type AnnotationPointer ¶
type AnnotationPointer struct {
// contains filtered or unexported fields
}
type BcmSession ¶
type BcmSession struct {
// contains filtered or unexported fields
}
BcmSession keeps blockchain machine protocol session information
type BcmTransportHeader ¶
type BcmTransportHeader struct {
// contains filtered or unexported fields
}
type CertificateInfo ¶
type CertificateInfo struct {
// contains filtered or unexported fields
}
type HardwarePeer ¶
Keeps hardware peer related information.
type Organization ¶
Orgnization in config file