sparseblock

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

DRUNIX

Copyright National Payments Corporation of India. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

DRUNIX

DRUNIX

Copyright National Payments Corporation of India. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

DRUNIX

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLastProcessedBlk

func GetLastProcessedBlk(chain deliver.Chain) (blockledger.Iterator, uint64)

Types

type BlockCreator

type BlockCreator struct {
	// contains filtered or unexported fields
}

type CacheStore

type CacheStore interface {
	GetLocalStore()
}

type ChannelHeadInfoProto

type ChannelHeadInfoProto struct {
	LastFatBlockNumberProcessed uint64                            `protobuf:"varint,1,opt,name=LastFatBlockNumberProcessed,proto3" json:"LastFatBlockNumberProcessed,omitempty"`
	OrgHeadPostion              map[string]*LastBlockMappingProto `` /* 169-byte string literal not displayed */
	XXX_NoUnkeyedLiteral        struct{}                          `json:"-"`
	XXX_unrecognized            []byte                            `json:"-"`
	XXX_sizecache               int32                             `json:"-"`
}

func (*ChannelHeadInfoProto) Descriptor

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

func (*ChannelHeadInfoProto) GetLastFatBlockNumberProcessed

func (m *ChannelHeadInfoProto) GetLastFatBlockNumberProcessed() uint64

func (*ChannelHeadInfoProto) GetOrgHeadPostion

func (m *ChannelHeadInfoProto) GetOrgHeadPostion() map[string]*LastBlockMappingProto

func (*ChannelHeadInfoProto) ProtoMessage

func (*ChannelHeadInfoProto) ProtoMessage()

func (*ChannelHeadInfoProto) Reset

func (m *ChannelHeadInfoProto) Reset()

func (*ChannelHeadInfoProto) String

func (m *ChannelHeadInfoProto) String() string

func (*ChannelHeadInfoProto) XXX_DiscardUnknown

func (m *ChannelHeadInfoProto) XXX_DiscardUnknown()

func (*ChannelHeadInfoProto) XXX_Marshal

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

func (*ChannelHeadInfoProto) XXX_Merge

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

func (*ChannelHeadInfoProto) XXX_Size

func (m *ChannelHeadInfoProto) XXX_Size() int

func (*ChannelHeadInfoProto) XXX_Unmarshal

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

type ChannelOrgChains

type ChannelOrgChains struct {
	// contains filtered or unexported fields
}

type FatBlockMerkleInfoProto

type FatBlockMerkleInfoProto struct {
	MerkleRoot           []byte                           `protobuf:"bytes,1,opt,name=MerkleRoot,proto3" json:"MerkleRoot,omitempty"`
	OrgHashMap           map[string]*OrgBlockDetailsProto `` /* 161-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                         `json:"-"`
	XXX_unrecognized     []byte                           `json:"-"`
	XXX_sizecache        int32                            `json:"-"`
}

func (*FatBlockMerkleInfoProto) Descriptor

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

func (*FatBlockMerkleInfoProto) GetMerkleRoot

func (m *FatBlockMerkleInfoProto) GetMerkleRoot() []byte

func (*FatBlockMerkleInfoProto) GetOrgHashMap

func (m *FatBlockMerkleInfoProto) GetOrgHashMap() map[string]*OrgBlockDetailsProto

func (*FatBlockMerkleInfoProto) ProtoMessage

func (*FatBlockMerkleInfoProto) ProtoMessage()

func (*FatBlockMerkleInfoProto) Reset

func (m *FatBlockMerkleInfoProto) Reset()

func (*FatBlockMerkleInfoProto) String

func (m *FatBlockMerkleInfoProto) String() string

func (*FatBlockMerkleInfoProto) XXX_DiscardUnknown

func (m *FatBlockMerkleInfoProto) XXX_DiscardUnknown()

func (*FatBlockMerkleInfoProto) XXX_Marshal

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

func (*FatBlockMerkleInfoProto) XXX_Merge

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

func (*FatBlockMerkleInfoProto) XXX_Size

func (m *FatBlockMerkleInfoProto) XXX_Size() int

func (*FatBlockMerkleInfoProto) XXX_Unmarshal

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

type LastBlockMappingProto

type LastBlockMappingProto struct {
	LastOrgBlockNum      uint64   `protobuf:"varint,1,opt,name=LastOrgBlockNum,proto3" json:"LastOrgBlockNum,omitempty"`
	LastOrgBlockHash     []byte   `protobuf:"bytes,2,opt,name=LastOrgBlockHash,proto3" json:"LastOrgBlockHash,omitempty"`
	SourceFatBlockNum    uint64   `protobuf:"varint,3,opt,name=SourceFatBlockNum,proto3" json:"SourceFatBlockNum,omitempty"`
	LastConfigBlockNum   uint64   `protobuf:"varint,4,opt,name=LastConfigBlockNum,proto3" json:"LastConfigBlockNum,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LastBlockMappingProto) Descriptor

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

func (*LastBlockMappingProto) GetLastConfigBlockNum

func (m *LastBlockMappingProto) GetLastConfigBlockNum() uint64

func (*LastBlockMappingProto) GetLastOrgBlockHash

func (m *LastBlockMappingProto) GetLastOrgBlockHash() []byte

func (*LastBlockMappingProto) GetLastOrgBlockNum

func (m *LastBlockMappingProto) GetLastOrgBlockNum() uint64

func (*LastBlockMappingProto) GetSourceFatBlockNum

func (m *LastBlockMappingProto) GetSourceFatBlockNum() uint64

func (*LastBlockMappingProto) ProtoMessage

func (*LastBlockMappingProto) ProtoMessage()

func (*LastBlockMappingProto) Reset

func (m *LastBlockMappingProto) Reset()

func (*LastBlockMappingProto) String

func (m *LastBlockMappingProto) String() string

func (*LastBlockMappingProto) XXX_DiscardUnknown

func (m *LastBlockMappingProto) XXX_DiscardUnknown()

func (*LastBlockMappingProto) XXX_Marshal

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

func (*LastBlockMappingProto) XXX_Merge

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

func (*LastBlockMappingProto) XXX_Size

func (m *LastBlockMappingProto) XXX_Size() int

func (*LastBlockMappingProto) XXX_Unmarshal

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

type OrgBlockDetailsProto

type OrgBlockDetailsProto struct {
	OrgBlockNumber       uint64   `protobuf:"varint,1,opt,name=OrgBlockNumber,proto3" json:"OrgBlockNumber,omitempty"`
	Authpath             []byte   `protobuf:"bytes,2,opt,name=Authpath,proto3" json:"Authpath,omitempty"`
	Hash                 []byte   `protobuf:"bytes,3,opt,name=Hash,proto3" json:"Hash,omitempty"`
	TxnIndexList         []uint64 `protobuf:"varint,4,rep,packed,name=TxnIndexList,proto3" json:"TxnIndexList,omitempty"`
	PrevioushHash        []byte   `protobuf:"bytes,5,opt,name=PrevioushHash,proto3" json:"PrevioushHash,omitempty"`
	PrevFatblockNumber   uint64   `protobuf:"varint,6,opt,name=PrevFatblockNumber,proto3" json:"PrevFatblockNumber,omitempty"`
	LastConfigBlockNum   uint64   `protobuf:"varint,7,opt,name=LastConfigBlockNum,proto3" json:"LastConfigBlockNum,omitempty"`
	MetadataSignature    []byte   `protobuf:"bytes,8,opt,name=MetadataSignature,proto3" json:"MetadataSignature,omitempty"`
	MetadataLastConfig   []byte   `protobuf:"bytes,9,opt,name=MetadataLastConfig,proto3" json:"MetadataLastConfig,omitempty"`
	SparseBlockFilter    []byte   `protobuf:"bytes,10,opt,name=SparseBlockFilter,proto3" json:"SparseBlockFilter,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*OrgBlockDetailsProto) Descriptor

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

func (*OrgBlockDetailsProto) GetAuthpath

func (m *OrgBlockDetailsProto) GetAuthpath() []byte

func (*OrgBlockDetailsProto) GetHash

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

func (*OrgBlockDetailsProto) GetLastConfigBlockNum

func (m *OrgBlockDetailsProto) GetLastConfigBlockNum() uint64

func (*OrgBlockDetailsProto) GetMetadataLastConfig

func (m *OrgBlockDetailsProto) GetMetadataLastConfig() []byte

func (*OrgBlockDetailsProto) GetMetadataSignature

func (m *OrgBlockDetailsProto) GetMetadataSignature() []byte

func (*OrgBlockDetailsProto) GetOrgBlockNumber

func (m *OrgBlockDetailsProto) GetOrgBlockNumber() uint64

func (*OrgBlockDetailsProto) GetPrevFatblockNumber

func (m *OrgBlockDetailsProto) GetPrevFatblockNumber() uint64

func (*OrgBlockDetailsProto) GetPrevioushHash

func (m *OrgBlockDetailsProto) GetPrevioushHash() []byte

func (*OrgBlockDetailsProto) GetSparseBlockFilter

func (m *OrgBlockDetailsProto) GetSparseBlockFilter() []byte

func (*OrgBlockDetailsProto) GetTxnIndexList

func (m *OrgBlockDetailsProto) GetTxnIndexList() []uint64

func (*OrgBlockDetailsProto) ProtoMessage

func (*OrgBlockDetailsProto) ProtoMessage()

func (*OrgBlockDetailsProto) Reset

func (m *OrgBlockDetailsProto) Reset()

func (*OrgBlockDetailsProto) String

func (m *OrgBlockDetailsProto) String() string

func (*OrgBlockDetailsProto) XXX_DiscardUnknown

func (m *OrgBlockDetailsProto) XXX_DiscardUnknown()

func (*OrgBlockDetailsProto) XXX_Marshal

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

func (*OrgBlockDetailsProto) XXX_Merge

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

func (*OrgBlockDetailsProto) XXX_Size

func (m *OrgBlockDetailsProto) XXX_Size() int

func (*OrgBlockDetailsProto) XXX_Unmarshal

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

type OrgBlockTxnIndex

type OrgBlockTxnIndex struct {
	// contains filtered or unexported fields
}

type OrgChain

type OrgChain struct {
	// contains filtered or unexported fields
}

func NewOrgChain

func NewOrgChain(mspID string, channel string, chainSupport deliver.Chain, orgBlockCacheSize uint64) *OrgChain

NewOrgChain creates orgChain for a newly added org to the channel

func (*OrgChain) Errored

func (oc *OrgChain) Errored() <-chan struct{}

func (*OrgChain) PolicyManager

func (oc *OrgChain) PolicyManager() policies.Manager

func (*OrgChain) Reader

func (oc *OrgChain) Reader() blockledger.Reader

func (*OrgChain) Sequence

func (oc *OrgChain) Sequence() uint64

type OrgChainReadWriter

type OrgChainReadWriter interface {
	OrgChainWriter
	OrgChainReader
}

type OrgChainReader

type OrgChainReader interface {
	Get([]byte) ([]byte, bool)
}

type OrgChainStore

type OrgChainStore struct {
	// contains filtered or unexported fields
}

func (*OrgChainStore) Get

func (ocStore *OrgChainStore) Get(key []byte) ([]byte, bool)

func (*OrgChainStore) Height

func (ocStore *OrgChainStore) Height() uint64

Retrieves the height of the org chain by reading the channel header metadata

func (*OrgChainStore) Iterator

func (ocStore *OrgChainStore) Iterator(seekPosition *ab.SeekPosition) (blockledger.Iterator, uint64)

Iterator returns an iterator and starting block number based on the seek position (Oldest, Newest, Specified, NextCommit)

func (*OrgChainStore) Put

func (ocStore *OrgChainStore) Put(key, value []byte)

func (*OrgChainStore) RetrieveBlockByNumber

func (ocStore *OrgChainStore) RetrieveBlockByNumber(blockNumber uint64) (*cb.Block, error)

RetrieveBlockByNumber returns the block for the given block number

type OrgChainWriter

type OrgChainWriter interface {
	Put([]byte, []byte)
}

type OrgChainsRegistrar

type OrgChainsRegistrar struct {
	// contains filtered or unexported fields
}

func NewOrgChainsRegistrar

func NewOrgChainsRegistrar(fatBlockRegistrar *multichannel.Registrar,
	fileLedgerConf localconfig.FileLedger, mvccApplicable bool) *OrgChainsRegistrar

NewOrgChainsRegistrar creates and returns an OrgChainsRegistrar

func (*OrgChainsRegistrar) GetChain

func (ocRegistrar *OrgChainsRegistrar) GetChain(channelID string, mspID string) deliver.Chain

GetChain returns the deliver-Chain for the given channelID and mspID, initializing it if not found in the channel map and storing into the channelMap

func (*OrgChainsRegistrar) InitializeSparseChains

func (orgRegistrar *OrgChainsRegistrar) InitializeSparseChains()

InitializeSparseChains starts the process of building and processing big chain trees in a separate goroutine

type SparseTxnFilterProto

type SparseTxnFilterProto struct {
	FatBlockNumber       uint64          `protobuf:"varint,1,opt,name=FatBlockNumber,proto3" json:"FatBlockNumber,omitempty"`
	TxnInfoList          []*TxnInfoProto `protobuf:"bytes,2,rep,name=TxnInfoList,proto3" json:"TxnInfoList,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*SparseTxnFilterProto) Descriptor

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

func (*SparseTxnFilterProto) GetFatBlockNumber

func (m *SparseTxnFilterProto) GetFatBlockNumber() uint64

func (*SparseTxnFilterProto) GetTxnInfoList

func (m *SparseTxnFilterProto) GetTxnInfoList() []*TxnInfoProto

func (*SparseTxnFilterProto) ProtoMessage

func (*SparseTxnFilterProto) ProtoMessage()

func (*SparseTxnFilterProto) Reset

func (m *SparseTxnFilterProto) Reset()

func (*SparseTxnFilterProto) String

func (m *SparseTxnFilterProto) String() string

func (*SparseTxnFilterProto) XXX_DiscardUnknown

func (m *SparseTxnFilterProto) XXX_DiscardUnknown()

func (*SparseTxnFilterProto) XXX_Marshal

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

func (*SparseTxnFilterProto) XXX_Merge

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

func (*SparseTxnFilterProto) XXX_Size

func (m *SparseTxnFilterProto) XXX_Size() int

func (*SparseTxnFilterProto) XXX_Unmarshal

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

type TxnInfoProto

type TxnInfoProto struct {
	IndexInFatBlock      uint64   `protobuf:"varint,1,opt,name=IndexInFatBlock,proto3" json:"IndexInFatBlock,omitempty"`
	TxnMVCCStatus        int32    `protobuf:"varint,2,opt,name=TxnMVCCStatus,proto3" json:"TxnMVCCStatus,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TxnInfoProto) Descriptor

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

func (*TxnInfoProto) GetIndexInFatBlock

func (m *TxnInfoProto) GetIndexInFatBlock() uint64

func (*TxnInfoProto) GetTxnMVCCStatus

func (m *TxnInfoProto) GetTxnMVCCStatus() int32

func (*TxnInfoProto) ProtoMessage

func (*TxnInfoProto) ProtoMessage()

func (*TxnInfoProto) Reset

func (m *TxnInfoProto) Reset()

func (*TxnInfoProto) String

func (m *TxnInfoProto) String() string

func (*TxnInfoProto) XXX_DiscardUnknown

func (m *TxnInfoProto) XXX_DiscardUnknown()

func (*TxnInfoProto) XXX_Marshal

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

func (*TxnInfoProto) XXX_Merge

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

func (*TxnInfoProto) XXX_Size

func (m *TxnInfoProto) XXX_Size() int

func (*TxnInfoProto) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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