Documentation ¶
Index ¶
- Variables
- func GetBucket(bucket []byte)
- func RegisterPrometheus()
- type BlockSet
- type ByAnchorDBHeightAscending
- type Overlay
- func (db *Overlay) Clear(bucket []byte) error
- func (db *Overlay) Close() (err error)
- func (dbo *Overlay) CreateUpdatedDirBlockInfoFromAnchorRecord(ar *anchor.AnchorRecord) (*dbInfo.DirBlockInfo, error)
- func (db *Overlay) Delete(bucket, key []byte) error
- func (db *Overlay) DoesKeyExist(bucket, key []byte) (bool, error)
- func (db *Overlay) ExecuteMultiBatch() error
- func (db *Overlay) FetchABlock(hash interfaces.IHash) (interfaces.IAdminBlock, error)
- func (db *Overlay) FetchABlockByHeight(blockHeight uint32) (interfaces.IAdminBlock, error)
- func (db *Overlay) FetchABlockByPrimary(hash interfaces.IHash) (interfaces.IAdminBlock, error)
- func (db *Overlay) FetchABlockBySecondary(hash interfaces.IHash) (interfaces.IAdminBlock, error)
- func (db *Overlay) FetchABlockHead() (interfaces.IAdminBlock, error)
- func (db *Overlay) FetchAllABlockKeys() ([]interfaces.IHash, error)
- func (db *Overlay) FetchAllABlocks() ([]interfaces.IAdminBlock, error)
- func (db *Overlay) FetchAllBlockKeysFromBucket(bucket []byte) ([]interfaces.IHash, error)
- func (db *Overlay) FetchAllBlocksFromBucket(bucket []byte, sample interfaces.BinaryMarshallableAndCopyable) ([]interfaces.BinaryMarshallableAndCopyable, error)
- func (db *Overlay) FetchAllConfirmedDirBlockInfos() ([]interfaces.IDirBlockInfo, error)
- func (db *Overlay) FetchAllDBlockKeys() ([]interfaces.IHash, error)
- func (db *Overlay) FetchAllDBlocks() ([]interfaces.IDirectoryBlock, error)
- func (db *Overlay) FetchAllDirBlockInfos() ([]interfaces.IDirBlockInfo, error)
- func (db *Overlay) FetchAllEBlockChainIDs() ([]interfaces.IHash, error)
- func (db *Overlay) FetchAllEBlocksByChain(chainID interfaces.IHash) ([]interfaces.IEntryBlock, error)
- func (db *Overlay) FetchAllECBlockKeys() ([]interfaces.IHash, error)
- func (db *Overlay) FetchAllECBlocks() ([]interfaces.IEntryCreditBlock, error)
- func (db *Overlay) FetchAllEntriesByChainID(chainID interfaces.IHash) ([]interfaces.IEBEntry, error)
- func (db *Overlay) FetchAllEntryIDs() ([]interfaces.IHash, error)
- func (db *Overlay) FetchAllEntryIDsByChainID(chainID interfaces.IHash) ([]interfaces.IHash, error)
- func (db *Overlay) FetchAllFBlockKeys() ([]interfaces.IHash, error)
- func (db *Overlay) FetchAllFBlocks() ([]interfaces.IFBlock, error)
- func (db *Overlay) FetchAllUnconfirmedDirBlockInfos() ([]interfaces.IDirBlockInfo, error)
- func (db *Overlay) FetchBlock(bucket []byte, key interfaces.IHash, dst interfaces.DatabaseBatchable) (interfaces.DatabaseBatchable, error)
- func (db *Overlay) FetchBlockByHeight(heightBucket []byte, blockBucket []byte, blockHeight uint32, ...) (interfaces.DatabaseBatchable, error)
- func (db *Overlay) FetchBlockBySecondaryIndex(secondaryIndexBucket, blockBucket []byte, index interfaces.IHash, ...) (interfaces.DatabaseBatchable, error)
- func (db *Overlay) FetchBlockIndexByHeight(bucket []byte, blockHeight uint32) (interfaces.IHash, error)
- func (db *Overlay) FetchBlockIndexesInHeightRange(numberBucket []byte, startHeight, endHeight int64) ([]interfaces.IHash, error)
- func (db *Overlay) FetchBlockSetByHeight(dbheight uint32) (*BlockSet, error)
- func (db *Overlay) FetchBlockSetByHeightWithEntries(dbheight uint32) (*BlockSet, error)
- func (db *Overlay) FetchChainHeadByChainID(bucket []byte, chainID interfaces.IHash, dst interfaces.DatabaseBatchable) (interfaces.DatabaseBatchable, error)
- func (db *Overlay) FetchDBKeyMRByHash(hash interfaces.IHash) (interfaces.IHash, error)
- func (db *Overlay) FetchDBKeyMRByHeight(dBlockHeight uint32) (interfaces.IHash, error)
- func (db *Overlay) FetchDBlock(hash interfaces.IHash) (interfaces.IDirectoryBlock, error)
- func (db *Overlay) FetchDBlockByHeight(dBlockHeight uint32) (interfaces.IDirectoryBlock, error)
- func (db *Overlay) FetchDBlockByPrimary(keyMR interfaces.IHash) (interfaces.IDirectoryBlock, error)
- func (db *Overlay) FetchDBlockBySecondary(dBMR interfaces.IHash) (interfaces.IDirectoryBlock, error)
- func (db *Overlay) FetchDBlockHead() (interfaces.IDirectoryBlock, error)
- func (db *Overlay) FetchDBlockHeightByKeyMR(sha interfaces.IHash) (int64, error)
- func (db *Overlay) FetchDBlockHeightRange(startHeight, endHeight int64) ([]interfaces.IHash, error)
- func (db *Overlay) FetchDatabaseEntryHeight() (uint32, error)
- func (db *Overlay) FetchDirBlockInfoByHash(hash interfaces.IHash) (interfaces.IDirBlockInfo, error)
- func (db *Overlay) FetchDirBlockInfoByKeyMR(hash interfaces.IHash) (interfaces.IDirBlockInfo, error)
- func (db *Overlay) FetchDirectoryBlockHead() (interfaces.IDirectoryBlock, error)
- func (db *Overlay) FetchEBKeyMRByHash(hash interfaces.IHash) (interfaces.IHash, error)
- func (db *Overlay) FetchEBlock(hash interfaces.IHash) (interfaces.IEntryBlock, error)
- func (db *Overlay) FetchEBlockByPrimary(hash interfaces.IHash) (interfaces.IEntryBlock, error)
- func (db *Overlay) FetchEBlockBySecondary(hash interfaces.IHash) (interfaces.IEntryBlock, error)
- func (db *Overlay) FetchEBlockHead(chainID interfaces.IHash) (interfaces.IEntryBlock, error)
- func (db *Overlay) FetchECBlock(hash interfaces.IHash) (interfaces.IEntryCreditBlock, error)
- func (db *Overlay) FetchECBlockByHeight(blockHeight uint32) (interfaces.IEntryCreditBlock, error)
- func (db *Overlay) FetchECBlockByPrimary(hash interfaces.IHash) (interfaces.IEntryCreditBlock, error)
- func (db *Overlay) FetchECBlockBySecondary(hash interfaces.IHash) (interfaces.IEntryCreditBlock, error)
- func (db *Overlay) FetchECBlockHead() (interfaces.IEntryCreditBlock, error)
- func (db *Overlay) FetchECTransaction(hash interfaces.IHash) (interfaces.IECBlockEntry, error)
- func (db *Overlay) FetchEntry(hash interfaces.IHash) (interfaces.IEBEntry, error)
- func (db *Overlay) FetchFBlock(hash interfaces.IHash) (interfaces.IFBlock, error)
- func (db *Overlay) FetchFBlockByHeight(blockHeight uint32) (interfaces.IFBlock, error)
- func (db *Overlay) FetchFBlockByPrimary(keyMR interfaces.IHash) (interfaces.IFBlock, error)
- func (db *Overlay) FetchFBlockBySecondary(hash interfaces.IHash) (interfaces.IFBlock, error)
- func (db *Overlay) FetchFBlockHead() (interfaces.IFBlock, error)
- func (db *Overlay) FetchFactoidBlockHead() (interfaces.IFBlock, error)
- func (db *Overlay) FetchFactoidTransaction(hash interfaces.IHash) (interfaces.ITransaction, error)
- func (db *Overlay) FetchHeadIndexByChainID(chainID interfaces.IHash) (interfaces.IHash, error)
- func (db *Overlay) FetchIncludedIn(hash interfaces.IHash) (interfaces.IHash, error)
- func (db *Overlay) FetchKeyValueStore(key []byte, dst interfaces.BinaryMarshallable) (interfaces.BinaryMarshallable, error)
- func (db *Overlay) FetchPaidFor(hash interfaces.IHash) (interfaces.IHash, error)
- func (db *Overlay) FetchPrimaryIndexBySecondaryIndex(secondaryIndexBucket []byte, key interfaces.IHash) (interfaces.IHash, error)
- func (db *Overlay) Get(bucket, key []byte, destination interfaces.BinaryMarshallable) (interfaces.BinaryMarshallable, error)
- func (db *Overlay) GetAll(bucket []byte, sample interfaces.BinaryMarshallableAndCopyable) ([]interfaces.BinaryMarshallableAndCopyable, [][]byte, error)
- func (db *Overlay) GetEntryType(hash interfaces.IHash) (interfaces.IHash, error)
- func (db *Overlay) Insert(bucket []byte, entry interfaces.DatabaseBatchable) error
- func (db *Overlay) InsertEntry(entry interfaces.IEBEntry) error
- func (db *Overlay) InsertEntryMultiBatch(entry interfaces.IEBEntry) error
- func (db *Overlay) ListAllBuckets() ([][]byte, error)
- func (db *Overlay) ListAllKeys(bucket []byte) ([][]byte, error)
- func (db *Overlay) ProcessABlockBatch(block interfaces.DatabaseBatchable) error
- func (db *Overlay) ProcessABlockBatchWithoutHead(block interfaces.DatabaseBatchable) error
- func (db *Overlay) ProcessABlockMultiBatch(block interfaces.DatabaseBatchable) error
- func (db *Overlay) ProcessBlockBatch(blockBucket, numberBucket, secondaryIndexBucket []byte, ...) error
- func (db *Overlay) ProcessBlockBatchWithoutHead(blockBucket, numberBucket, secondaryIndexBucket []byte, ...) error
- func (db *Overlay) ProcessBlockMultiBatch(blockBucket, numberBucket, secondaryIndexBucket []byte, ...) error
- func (db *Overlay) ProcessBlockMultiBatchWithoutHead(blockBucket, numberBucket, secondaryIndexBucket []byte, ...) error
- func (db *Overlay) ProcessDBlockBatch(dblock interfaces.DatabaseBlockWithEntries) error
- func (db *Overlay) ProcessDBlockBatchWithoutHead(dblock interfaces.DatabaseBlockWithEntries) error
- func (db *Overlay) ProcessDBlockMultiBatch(dblock interfaces.DatabaseBlockWithEntries) error
- func (db *Overlay) ProcessDirBlockInfoBatch(block interfaces.IDirBlockInfo) error
- func (db *Overlay) ProcessDirBlockInfoMultiBatch(block interfaces.IDirBlockInfo) error
- func (db *Overlay) ProcessEBlockBatch(eblock interfaces.DatabaseBlockWithEntries, checkForDuplicateEntries bool) error
- func (db *Overlay) ProcessEBlockBatchWithoutHead(eblock interfaces.DatabaseBlockWithEntries, checkForDuplicateEntries bool) error
- func (db *Overlay) ProcessEBlockMultiBatch(eblock interfaces.DatabaseBlockWithEntries, checkForDuplicateEntries bool) error
- func (db *Overlay) ProcessEBlockMultiBatchWithoutHead(eblock interfaces.DatabaseBlockWithEntries, checkForDuplicateEntries bool) error
- func (db *Overlay) ProcessECBlockBatch(block interfaces.IEntryCreditBlock, checkForDuplicateEntries bool) error
- func (db *Overlay) ProcessECBlockBatchWithoutHead(block interfaces.IEntryCreditBlock, checkForDuplicateEntries bool) error
- func (db *Overlay) ProcessECBlockMultiBatch(block interfaces.IEntryCreditBlock, checkForDuplicateEntries bool) error
- func (db *Overlay) ProcessFBlockBatch(block interfaces.DatabaseBlockWithEntries) error
- func (db *Overlay) ProcessFBlockBatchWithoutHead(block interfaces.DatabaseBlockWithEntries) error
- func (db *Overlay) ProcessFBlockMultiBatch(block interfaces.DatabaseBlockWithEntries) error
- func (db *Overlay) Put(bucket, key []byte, data interfaces.BinaryMarshallable) error
- func (db *Overlay) PutInBatch(records []interfaces.Record) error
- func (db *Overlay) PutInMultiBatch(records []interfaces.Record)
- func (dbo *Overlay) ReparseAnchorChains() error
- func (db *Overlay) SaveABlockHead(block interfaces.DatabaseBatchable) error
- func (dbo *Overlay) SaveAnchorInfoFromEntry(entry interfaces.IEBEntry, multiBatch bool) error
- func (db *Overlay) SaveDatabaseEntryHeight(height uint32) error
- func (db *Overlay) SaveDirBlockInfo(block interfaces.IDirBlockInfo) error
- func (db *Overlay) SaveDirectoryBlockHead(dblock interfaces.DatabaseBlockWithEntries) error
- func (db *Overlay) SaveEBlockHead(block interfaces.DatabaseBlockWithEntries, checkForDuplicateEntries bool) error
- func (db *Overlay) SaveECBlockHead(block interfaces.IEntryCreditBlock, checkForDuplicateEntries bool) error
- func (db *Overlay) SaveFactoidBlockHead(fblock interfaces.DatabaseBlockWithEntries) error
- func (db *Overlay) SaveIncludedIn(entry, block interfaces.IHash) error
- func (db *Overlay) SaveIncludedInMulti(entries []interfaces.IHash, block interfaces.IHash, ...) error
- func (db *Overlay) SaveIncludedInMultiFromBlock(block interfaces.DatabaseBlockWithEntries, checkForDuplicateEntries bool) error
- func (db *Overlay) SaveIncludedInMultiFromBlockMultiBatch(block interfaces.DatabaseBlockWithEntries, checkForDuplicateEntries bool) error
- func (db *Overlay) SaveIncludedInMultiMultiBatch(entries []interfaces.IHash, block interfaces.IHash, ...) error
- func (db *Overlay) SaveKeyValueStore(kvs interfaces.BinaryMarshallable, key []byte) error
- func (db *Overlay) SavePaidFor(entry, ecEntry interfaces.IHash) error
- func (db *Overlay) SavePaidForMultiFromBlock(block interfaces.IEntryCreditBlock, checkForDuplicateEntries bool) error
- func (db *Overlay) SavePaidForMultiFromBlockMultiBatch(block interfaces.IEntryCreditBlock, checkForDuplicateEntries bool) error
- func (dbo *Overlay) SetBitcoinAnchorRecordPublicKeysFromHex(publicKeys []string) error
- func (db *Overlay) SetChainHeads(primaryIndexes, chainIDs []interfaces.IHash) error
- func (dbo *Overlay) SetEthereumAnchorRecordPublicKeysFromHex(publicKeys []string) error
- func (db *Overlay) SetExportData(path string)
- func (db *Overlay) StartMultiBatch()
- func (db *Overlay) Trim()
Constants ¶
This section is empty.
Variables ¶
var ( OverlayDBGetsDblock = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_dblock", Help: "Counts gets from the database", }) OverlayDBGetsDblockNumber = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_dblocknum", Help: "Counts gets from the database", }) OverlayDBGetsDBlockSecond = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_dblocksecondart", Help: "Counts gets from the database", }) OverlayDBGetsABlock = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_ablock", Help: "Counts gets from the database", }) OverlayDBGetsABlockNumber = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_ablocknum", Help: "Counts gets from the database", }) OverlayDBGetsABlockSecondary = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_ablocksecondary", Help: "Counts gets from the database", }) OverlayDBGetsFBlock = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_fblock", Help: "Counts gets from the database", }) OverlayDBGetsFBlockNumber = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_fblocknumber", Help: "Counts gets from the database", }) OverlayDBGetsFBlockSecondary = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_fblocksecondary", Help: "Counts gets from the database", }) OverlayDBGetsEC = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_ec", Help: "Counts gets from the database", }) OverlayDBGetsECNumber = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_ecnumber", Help: "Counts gets from the database", }) OverlayDBGetsECSecondary = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_ecsecondary", Help: "Counts gets from the database", }) OverlayDBGetsChainHead = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_chainhead", Help: "Counts gets from the database", }) OverlayDBGetsEBlock = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_eblock", Help: "Counts gets from the database", }) OverlayDBGetsEBlockNumber = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_eblocknumber", Help: "Counts gets from the database", }) OverlayDBGetsEBlockSecondary = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_eblocksecondary", Help: "Counts gets from the database", }) OverlayDBGetsEntry = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_entry", Help: "Counts gets from the database", }) OverlayDBGetsDirBlockInfo = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_dirblockinfo", Help: "Counts gets from the database", }) OverlayDBGetsDirBlockUnconfirmed = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_dirblockunconfirmed", Help: "Counts gets from the database", }) OverlayDBGetsDirBlockInfoNumber = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_dirblockinfonumber", Help: "Counts gets from the database", }) OverlayDBGetsDirBlockInfoSecondary = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_secondary", Help: "Counts gets from the database", }) OverlayDBGetsInvludeIn = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_includein", Help: "Counts gets from the database", }) OverlayDBGetsPaidFor = prometheus.NewCounter(prometheus.CounterOpts{ Name: "factomd_database_overlay_gets_paidfor", Help: "Counts gets from the database", }) )
var ( // Directory Block DIRECTORYBLOCK = []byte("DirectoryBlock") DIRECTORYBLOCK_NUMBER = []byte("DirectoryBlockNumber") DIRECTORYBLOCK_SECONDARYINDEX = []byte("DirectoryBlockSecondaryIndex") // Admin Block ADMINBLOCK = []byte("AdminBlock") ADMINBLOCK_NUMBER = []byte("AdminBlockNumber") ADMINBLOCK_SECONDARYINDEX = []byte("AdminBlockSecondaryIndex") //Factoid Block FACTOIDBLOCK = []byte("FactoidBlock") FACTOIDBLOCK_NUMBER = []byte("FactoidBlockNumber") FACTOIDBLOCK_SECONDARYINDEX = []byte("FactoidBlockSecondaryIndex") // Entry Credit Block ENTRYCREDITBLOCK = []byte("EntryCreditBlock") ENTRYCREDITBLOCK_NUMBER = []byte("EntryCreditBlockNumber") ENTRYCREDITBLOCK_SECONDARYINDEX = []byte("EntryCreditBlockSecondaryIndex") // The latest Block MR for chains including special chains CHAIN_HEAD = []byte("ChainHead") // Entry Block ENTRYBLOCK = []byte("EntryBlock") ENTRYBLOCK_CHAIN_NUMBER = []byte("EntryBlockNumber") ENTRYBLOCK_SECONDARYINDEX = []byte("EntryBlockSecondaryIndex") //Entry ENTRY = []byte("Entry") //Directory Block Info DIRBLOCKINFO = []byte("DirBlockInfo") DIRBLOCKINFO_UNCONFIRMED = []byte("DirBlockInfoUnconfirmed") DIRBLOCKINFO_NUMBER = []byte("DirBlockInfoNumber") DIRBLOCKINFO_SECONDARYINDEX = []byte("DirBlockInfoSecondaryIndex") //IncludedIn INCLUDED_IN = []byte("IncludedIn") //Which EC transaction paid for this Entry PAID_FOR = []byte("PaidFor") KEY_VALUE_STORE = []byte("KeyValueStore") )
the "table" prefix
var BitcoinAnchorChainID = "df3ade9eec4b08d5379cc64270c30ea7315d8a8a1a69efe2b98a60ecdd69e604"
var ConstantNamesMap map[string]string
var DatabaseEntryHeightKey = []byte("DatabaseEntryHeight")
var EthereumAnchorChainID = "6e4540d08d5ac6a1a394e982fb6a2ab8b516ee751c37420055141b94fe070bfe"
var ValidAnchorChains = map[string]bool{ BitcoinAnchorChainID: true, EthereumAnchorChainID: true, }
Functions ¶
func RegisterPrometheus ¶
func RegisterPrometheus()
RegisterPrometheus registers the variables to be exposed. This can only be run once, hence the boolean flag to prevent panics if launched more than once. This is called in NetStart
Types ¶
type BlockSet ¶
type BlockSet struct { DBHeight uint32 DBlock interfaces.IDirectoryBlock ABlock interfaces.IAdminBlock ECBlock interfaces.IEntryCreditBlock FBlock interfaces.IFBlock EBlocks []interfaces.IEntryBlock Entries []interfaces.IEBEntry }
type ByAnchorDBHeightAscending ¶
type ByAnchorDBHeightAscending []*anchor.AnchorRecord
AnchorRecord array sorting implementation - ascending
func (ByAnchorDBHeightAscending) Len ¶
func (f ByAnchorDBHeightAscending) Len() int
func (ByAnchorDBHeightAscending) Less ¶
func (f ByAnchorDBHeightAscending) Less(i, j int) bool
func (ByAnchorDBHeightAscending) Swap ¶
func (f ByAnchorDBHeightAscending) Swap(i, j int)
type Overlay ¶
type Overlay struct { DB interfaces.IDatabase ExportData bool ExportDataPath string BatchSemaphore sync.Mutex MultiBatch []interfaces.Record BlockExtractor blockExtractor.BlockExtractor BitcoinAnchorRecordPublicKeys []interfaces.Verifier EthereumAnchorRecordPublicKeys []interfaces.Verifier }
func NewOverlay ¶
func NewOverlay(db interfaces.IDatabase) *Overlay
func (*Overlay) CreateUpdatedDirBlockInfoFromAnchorRecord ¶
func (dbo *Overlay) CreateUpdatedDirBlockInfoFromAnchorRecord(ar *anchor.AnchorRecord) (*dbInfo.DirBlockInfo, error)
func (*Overlay) ExecuteMultiBatch ¶
func (*Overlay) FetchABlock ¶
func (db *Overlay) FetchABlock(hash interfaces.IHash) (interfaces.IAdminBlock, error)
func (*Overlay) FetchABlockByHeight ¶
func (db *Overlay) FetchABlockByHeight(blockHeight uint32) (interfaces.IAdminBlock, error)
FetchABlockByHeight gets an admin block by height from the database.
func (*Overlay) FetchABlockByPrimary ¶
func (db *Overlay) FetchABlockByPrimary(hash interfaces.IHash) (interfaces.IAdminBlock, error)
FetchABlockByKeyMR gets an admin block by keyMR from the database.
func (*Overlay) FetchABlockBySecondary ¶
func (db *Overlay) FetchABlockBySecondary(hash interfaces.IHash) (interfaces.IAdminBlock, error)
FetchABlockByHash gets an admin block by hash from the database.
func (*Overlay) FetchABlockHead ¶
func (db *Overlay) FetchABlockHead() (interfaces.IAdminBlock, error)
func (*Overlay) FetchAllABlockKeys ¶
func (db *Overlay) FetchAllABlockKeys() ([]interfaces.IHash, error)
func (*Overlay) FetchAllABlocks ¶
func (db *Overlay) FetchAllABlocks() ([]interfaces.IAdminBlock, error)
FetchAllABlocks gets all of the admin blocks
func (*Overlay) FetchAllBlockKeysFromBucket ¶
func (db *Overlay) FetchAllBlockKeysFromBucket(bucket []byte) ([]interfaces.IHash, error)
func (*Overlay) FetchAllBlocksFromBucket ¶
func (db *Overlay) FetchAllBlocksFromBucket(bucket []byte, sample interfaces.BinaryMarshallableAndCopyable) ([]interfaces.BinaryMarshallableAndCopyable, error)
func (*Overlay) FetchAllConfirmedDirBlockInfos ¶
func (db *Overlay) FetchAllConfirmedDirBlockInfos() ([]interfaces.IDirBlockInfo, error)
FetchAllConfirmedDirBlockInfos gets all of the confiemed dirblock info blocks
func (*Overlay) FetchAllDBlockKeys ¶
func (db *Overlay) FetchAllDBlockKeys() ([]interfaces.IHash, error)
func (*Overlay) FetchAllDBlocks ¶
func (db *Overlay) FetchAllDBlocks() ([]interfaces.IDirectoryBlock, error)
FetchAllDBlocks gets all of the fbInfo
func (*Overlay) FetchAllDirBlockInfos ¶
func (db *Overlay) FetchAllDirBlockInfos() ([]interfaces.IDirBlockInfo, error)
FetchAllDirBlockInfos gets all of the dirblock info blocks
func (*Overlay) FetchAllEBlockChainIDs ¶
func (db *Overlay) FetchAllEBlockChainIDs() ([]interfaces.IHash, error)
func (*Overlay) FetchAllEBlocksByChain ¶
func (db *Overlay) FetchAllEBlocksByChain(chainID interfaces.IHash) ([]interfaces.IEntryBlock, error)
FetchAllEBlocksByChain gets all of the blocks by chain id
func (*Overlay) FetchAllECBlockKeys ¶
func (db *Overlay) FetchAllECBlockKeys() ([]interfaces.IHash, error)
func (*Overlay) FetchAllECBlocks ¶
func (db *Overlay) FetchAllECBlocks() ([]interfaces.IEntryCreditBlock, error)
FetchAllECBlocks gets all of the entry credit blocks
func (*Overlay) FetchAllEntriesByChainID ¶
func (db *Overlay) FetchAllEntriesByChainID(chainID interfaces.IHash) ([]interfaces.IEBEntry, error)
func (*Overlay) FetchAllEntryIDs ¶
func (db *Overlay) FetchAllEntryIDs() ([]interfaces.IHash, error)
func (*Overlay) FetchAllEntryIDsByChainID ¶
func (db *Overlay) FetchAllEntryIDsByChainID(chainID interfaces.IHash) ([]interfaces.IHash, error)
func (*Overlay) FetchAllFBlockKeys ¶
func (db *Overlay) FetchAllFBlockKeys() ([]interfaces.IHash, error)
func (*Overlay) FetchAllFBlocks ¶
func (db *Overlay) FetchAllFBlocks() ([]interfaces.IFBlock, error)
func (*Overlay) FetchAllUnconfirmedDirBlockInfos ¶
func (db *Overlay) FetchAllUnconfirmedDirBlockInfos() ([]interfaces.IDirBlockInfo, error)
FetchAllUnconfirmedDirBlockInfos gets all of the unconfirmed dirblock info blocks
func (*Overlay) FetchBlock ¶
func (db *Overlay) FetchBlock(bucket []byte, key interfaces.IHash, dst interfaces.DatabaseBatchable) (interfaces.DatabaseBatchable, error)
func (*Overlay) FetchBlockByHeight ¶
func (db *Overlay) FetchBlockByHeight(heightBucket []byte, blockBucket []byte, blockHeight uint32, dst interfaces.DatabaseBatchable) (interfaces.DatabaseBatchable, error)
func (*Overlay) FetchBlockBySecondaryIndex ¶
func (db *Overlay) FetchBlockBySecondaryIndex(secondaryIndexBucket, blockBucket []byte, index interfaces.IHash, dst interfaces.DatabaseBatchable) (interfaces.DatabaseBatchable, error)
func (*Overlay) FetchBlockIndexByHeight ¶
func (*Overlay) FetchBlockIndexesInHeightRange ¶
func (db *Overlay) FetchBlockIndexesInHeightRange(numberBucket []byte, startHeight, endHeight int64) ([]interfaces.IHash, error)
Use endHeight of -1 (or other negative numbers) to fetch all / as many entries as possibe
func (*Overlay) FetchBlockSetByHeight ¶
func (*Overlay) FetchBlockSetByHeightWithEntries ¶
func (*Overlay) FetchChainHeadByChainID ¶
func (db *Overlay) FetchChainHeadByChainID(bucket []byte, chainID interfaces.IHash, dst interfaces.DatabaseBatchable) (interfaces.DatabaseBatchable, error)
func (*Overlay) FetchDBKeyMRByHash ¶
func (db *Overlay) FetchDBKeyMRByHash(hash interfaces.IHash) (interfaces.IHash, error)
FetchDBKeyMRByHash gets a DBlock KeyMR by hash.
func (*Overlay) FetchDBKeyMRByHeight ¶
func (db *Overlay) FetchDBKeyMRByHeight(dBlockHeight uint32) (interfaces.IHash, error)
FetchDBKeyMRByHeight gets a dBlock KeyMR from the database.
func (*Overlay) FetchDBlock ¶
func (db *Overlay) FetchDBlock(hash interfaces.IHash) (interfaces.IDirectoryBlock, error)
func (*Overlay) FetchDBlockByHeight ¶
func (db *Overlay) FetchDBlockByHeight(dBlockHeight uint32) (interfaces.IDirectoryBlock, error)
FetchDBlockByHeight gets an directory block by height from the database.
func (*Overlay) FetchDBlockByPrimary ¶
func (db *Overlay) FetchDBlockByPrimary(keyMR interfaces.IHash) (interfaces.IDirectoryBlock, error)
FetchDBlock gets an entry by hash from the database.
func (*Overlay) FetchDBlockBySecondary ¶
func (db *Overlay) FetchDBlockBySecondary(dBMR interfaces.IHash) (interfaces.IDirectoryBlock, error)
FetchDBlockByMR gets a directory block by merkle root from the database.
func (*Overlay) FetchDBlockHead ¶
func (db *Overlay) FetchDBlockHead() (interfaces.IDirectoryBlock, error)
func (*Overlay) FetchDBlockHeightByKeyMR ¶
func (db *Overlay) FetchDBlockHeightByKeyMR(sha interfaces.IHash) (int64, error)
FetchBlockHeightByKeyMR returns the block height for the given hash. This is part of the database.Db interface implementation.
func (*Overlay) FetchDBlockHeightRange ¶
func (db *Overlay) FetchDBlockHeightRange(startHeight, endHeight int64) ([]interfaces.IHash, error)
FetchHeightRange looks up a range of blocks by the start and ending heights. Fetch is inclusive of the start height and exclusive of the ending height. To fetch all hashes from the start height until no more are present, use -1 as endHeight.
func (*Overlay) FetchDatabaseEntryHeight ¶
func (*Overlay) FetchDirBlockInfoByHash ¶
func (db *Overlay) FetchDirBlockInfoByHash(hash interfaces.IHash) (interfaces.IDirBlockInfo, error)
FetchDirBlockInfoByHash gets a dirblock info block by hash from the database.
func (*Overlay) FetchDirBlockInfoByKeyMR ¶
func (db *Overlay) FetchDirBlockInfoByKeyMR(hash interfaces.IHash) (interfaces.IDirBlockInfo, error)
FetchDirBlockInfoByKeyMR gets a dirblock info block by keyMR from the database.
func (*Overlay) FetchDirectoryBlockHead ¶
func (db *Overlay) FetchDirectoryBlockHead() (interfaces.IDirectoryBlock, error)
func (*Overlay) FetchEBKeyMRByHash ¶
func (db *Overlay) FetchEBKeyMRByHash(hash interfaces.IHash) (interfaces.IHash, error)
FetchEBKeyMRByHash gets an entry by hash from the database.
func (*Overlay) FetchEBlock ¶
func (db *Overlay) FetchEBlock(hash interfaces.IHash) (interfaces.IEntryBlock, error)
func (*Overlay) FetchEBlockByPrimary ¶
func (db *Overlay) FetchEBlockByPrimary(hash interfaces.IHash) (interfaces.IEntryBlock, error)
FetchEBlockByKeyMR gets an entry by hash from the database.
func (*Overlay) FetchEBlockBySecondary ¶
func (db *Overlay) FetchEBlockBySecondary(hash interfaces.IHash) (interfaces.IEntryBlock, error)
FetchEBlockByHash gets an entry block by merkle root from the database.
func (*Overlay) FetchEBlockHead ¶
func (db *Overlay) FetchEBlockHead(chainID interfaces.IHash) (interfaces.IEntryBlock, error)
func (*Overlay) FetchECBlock ¶
func (db *Overlay) FetchECBlock(hash interfaces.IHash) (interfaces.IEntryCreditBlock, error)
func (*Overlay) FetchECBlockByHeight ¶
func (db *Overlay) FetchECBlockByHeight(blockHeight uint32) (interfaces.IEntryCreditBlock, error)
FetchECBlockByHeight gets an entry credit block by height from the database.
func (*Overlay) FetchECBlockByPrimary ¶
func (db *Overlay) FetchECBlockByPrimary(hash interfaces.IHash) (interfaces.IEntryCreditBlock, error)
FetchECBlockByHash gets an Entry Credit block by hash from the database.
func (*Overlay) FetchECBlockBySecondary ¶
func (db *Overlay) FetchECBlockBySecondary(hash interfaces.IHash) (interfaces.IEntryCreditBlock, error)
FetchECBlockByHeaderHash gets an Entry Credit block by hash from the database.
func (*Overlay) FetchECBlockHead ¶
func (db *Overlay) FetchECBlockHead() (interfaces.IEntryCreditBlock, error)
func (*Overlay) FetchECTransaction ¶
func (db *Overlay) FetchECTransaction(hash interfaces.IHash) (interfaces.IECBlockEntry, error)
func (*Overlay) FetchEntry ¶
func (db *Overlay) FetchEntry(hash interfaces.IHash) (interfaces.IEBEntry, error)
FetchEntry gets an entry by hash from the database.
func (*Overlay) FetchFBlock ¶
func (db *Overlay) FetchFBlock(hash interfaces.IHash) (interfaces.IFBlock, error)
func (*Overlay) FetchFBlockByHeight ¶
func (db *Overlay) FetchFBlockByHeight(blockHeight uint32) (interfaces.IFBlock, error)
FetchFBlockByHeight gets a factoid block by height from the database.
func (*Overlay) FetchFBlockByPrimary ¶
func (db *Overlay) FetchFBlockByPrimary(keyMR interfaces.IHash) (interfaces.IFBlock, error)
func (*Overlay) FetchFBlockBySecondary ¶
func (db *Overlay) FetchFBlockBySecondary(hash interfaces.IHash) (interfaces.IFBlock, error)
func (*Overlay) FetchFBlockHead ¶
func (db *Overlay) FetchFBlockHead() (interfaces.IFBlock, error)
func (*Overlay) FetchFactoidBlockHead ¶
func (db *Overlay) FetchFactoidBlockHead() (interfaces.IFBlock, error)
func (*Overlay) FetchFactoidTransaction ¶
func (db *Overlay) FetchFactoidTransaction(hash interfaces.IHash) (interfaces.ITransaction, error)
func (*Overlay) FetchHeadIndexByChainID ¶
func (db *Overlay) FetchHeadIndexByChainID(chainID interfaces.IHash) (interfaces.IHash, error)
FetchHeadMRByChainID gets an index of the highest block from the database.
func (*Overlay) FetchIncludedIn ¶
func (db *Overlay) FetchIncludedIn(hash interfaces.IHash) (interfaces.IHash, error)
func (*Overlay) FetchKeyValueStore ¶
func (db *Overlay) FetchKeyValueStore(key []byte, dst interfaces.BinaryMarshallable) (interfaces.BinaryMarshallable, error)
func (*Overlay) FetchPaidFor ¶
func (db *Overlay) FetchPaidFor(hash interfaces.IHash) (interfaces.IHash, error)
func (*Overlay) FetchPrimaryIndexBySecondaryIndex ¶
func (db *Overlay) FetchPrimaryIndexBySecondaryIndex(secondaryIndexBucket []byte, key interfaces.IHash) (interfaces.IHash, error)
func (*Overlay) Get ¶
func (db *Overlay) Get(bucket, key []byte, destination interfaces.BinaryMarshallable) (interfaces.BinaryMarshallable, error)
func (*Overlay) GetAll ¶
func (db *Overlay) GetAll(bucket []byte, sample interfaces.BinaryMarshallableAndCopyable) ([]interfaces.BinaryMarshallableAndCopyable, [][]byte, error)
func (*Overlay) GetEntryType ¶
func (db *Overlay) GetEntryType(hash interfaces.IHash) (interfaces.IHash, error)
func (*Overlay) Insert ¶
func (db *Overlay) Insert(bucket []byte, entry interfaces.DatabaseBatchable) error
func (*Overlay) InsertEntry ¶
func (db *Overlay) InsertEntry(entry interfaces.IEBEntry) error
InsertEntry inserts an entry
func (*Overlay) InsertEntryMultiBatch ¶
func (db *Overlay) InsertEntryMultiBatch(entry interfaces.IEBEntry) error
func (*Overlay) ListAllBuckets ¶
func (*Overlay) ProcessABlockBatch ¶
func (db *Overlay) ProcessABlockBatch(block interfaces.DatabaseBatchable) error
ProcessABlockBatch inserts the AdminBlock
func (*Overlay) ProcessABlockBatchWithoutHead ¶
func (db *Overlay) ProcessABlockBatchWithoutHead(block interfaces.DatabaseBatchable) error
func (*Overlay) ProcessABlockMultiBatch ¶
func (db *Overlay) ProcessABlockMultiBatch(block interfaces.DatabaseBatchable) error
func (*Overlay) ProcessBlockBatch ¶
func (db *Overlay) ProcessBlockBatch(blockBucket, numberBucket, secondaryIndexBucket []byte, block interfaces.DatabaseBatchable) error
func (*Overlay) ProcessBlockBatchWithoutHead ¶
func (db *Overlay) ProcessBlockBatchWithoutHead(blockBucket, numberBucket, secondaryIndexBucket []byte, block interfaces.DatabaseBatchable) error
func (*Overlay) ProcessBlockMultiBatch ¶
func (db *Overlay) ProcessBlockMultiBatch(blockBucket, numberBucket, secondaryIndexBucket []byte, block interfaces.DatabaseBatchable) error
func (*Overlay) ProcessBlockMultiBatchWithoutHead ¶
func (db *Overlay) ProcessBlockMultiBatchWithoutHead(blockBucket, numberBucket, secondaryIndexBucket []byte, block interfaces.DatabaseBatchable) error
func (*Overlay) ProcessDBlockBatch ¶
func (db *Overlay) ProcessDBlockBatch(dblock interfaces.DatabaseBlockWithEntries) error
ProcessDBlockBatche inserts the DBlock and update all it's dbentries in DB
func (*Overlay) ProcessDBlockBatchWithoutHead ¶
func (db *Overlay) ProcessDBlockBatchWithoutHead(dblock interfaces.DatabaseBlockWithEntries) error
func (*Overlay) ProcessDBlockMultiBatch ¶
func (db *Overlay) ProcessDBlockMultiBatch(dblock interfaces.DatabaseBlockWithEntries) error
func (*Overlay) ProcessDirBlockInfoBatch ¶
func (db *Overlay) ProcessDirBlockInfoBatch(block interfaces.IDirBlockInfo) error
ProcessDirBlockInfoBatch inserts the dirblock info block
func (*Overlay) ProcessDirBlockInfoMultiBatch ¶
func (db *Overlay) ProcessDirBlockInfoMultiBatch(block interfaces.IDirBlockInfo) error
func (*Overlay) ProcessEBlockBatch ¶
func (db *Overlay) ProcessEBlockBatch(eblock interfaces.DatabaseBlockWithEntries, checkForDuplicateEntries bool) error
ProcessEBlockBatche inserts the EBlock and update all it's ebentries in DB
func (*Overlay) ProcessEBlockBatchWithoutHead ¶
func (db *Overlay) ProcessEBlockBatchWithoutHead(eblock interfaces.DatabaseBlockWithEntries, checkForDuplicateEntries bool) error
func (*Overlay) ProcessEBlockMultiBatch ¶
func (db *Overlay) ProcessEBlockMultiBatch(eblock interfaces.DatabaseBlockWithEntries, checkForDuplicateEntries bool) error
func (*Overlay) ProcessEBlockMultiBatchWithoutHead ¶
func (db *Overlay) ProcessEBlockMultiBatchWithoutHead(eblock interfaces.DatabaseBlockWithEntries, checkForDuplicateEntries bool) error
func (*Overlay) ProcessECBlockBatch ¶
func (db *Overlay) ProcessECBlockBatch(block interfaces.IEntryCreditBlock, checkForDuplicateEntries bool) error
ProcessECBlockBatch inserts the ECBlock and update all it's cbentries in DB
func (*Overlay) ProcessECBlockBatchWithoutHead ¶
func (db *Overlay) ProcessECBlockBatchWithoutHead(block interfaces.IEntryCreditBlock, checkForDuplicateEntries bool) error
func (*Overlay) ProcessECBlockMultiBatch ¶
func (db *Overlay) ProcessECBlockMultiBatch(block interfaces.IEntryCreditBlock, checkForDuplicateEntries bool) error
func (*Overlay) ProcessFBlockBatch ¶
func (db *Overlay) ProcessFBlockBatch(block interfaces.DatabaseBlockWithEntries) error
func (*Overlay) ProcessFBlockBatchWithoutHead ¶
func (db *Overlay) ProcessFBlockBatchWithoutHead(block interfaces.DatabaseBlockWithEntries) error
func (*Overlay) ProcessFBlockMultiBatch ¶
func (db *Overlay) ProcessFBlockMultiBatch(block interfaces.DatabaseBlockWithEntries) error
func (*Overlay) Put ¶
func (db *Overlay) Put(bucket, key []byte, data interfaces.BinaryMarshallable) error
func (*Overlay) PutInBatch ¶
func (db *Overlay) PutInBatch(records []interfaces.Record) error
func (*Overlay) PutInMultiBatch ¶
func (db *Overlay) PutInMultiBatch(records []interfaces.Record)
func (*Overlay) ReparseAnchorChains ¶
func (*Overlay) SaveABlockHead ¶
func (db *Overlay) SaveABlockHead(block interfaces.DatabaseBatchable) error
func (*Overlay) SaveAnchorInfoFromEntry ¶
func (dbo *Overlay) SaveAnchorInfoFromEntry(entry interfaces.IEBEntry, multiBatch bool) error
func (*Overlay) SaveDatabaseEntryHeight ¶
func (*Overlay) SaveDirBlockInfo ¶
func (db *Overlay) SaveDirBlockInfo(block interfaces.IDirBlockInfo) error
func (*Overlay) SaveDirectoryBlockHead ¶
func (db *Overlay) SaveDirectoryBlockHead(dblock interfaces.DatabaseBlockWithEntries) error
func (*Overlay) SaveEBlockHead ¶
func (db *Overlay) SaveEBlockHead(block interfaces.DatabaseBlockWithEntries, checkForDuplicateEntries bool) error
func (*Overlay) SaveECBlockHead ¶
func (db *Overlay) SaveECBlockHead(block interfaces.IEntryCreditBlock, checkForDuplicateEntries bool) error
func (*Overlay) SaveFactoidBlockHead ¶
func (db *Overlay) SaveFactoidBlockHead(fblock interfaces.DatabaseBlockWithEntries) error
func (*Overlay) SaveIncludedIn ¶
func (db *Overlay) SaveIncludedIn(entry, block interfaces.IHash) error
func (*Overlay) SaveIncludedInMulti ¶
func (db *Overlay) SaveIncludedInMulti(entries []interfaces.IHash, block interfaces.IHash, checkForDuplicateEntries bool) error
func (*Overlay) SaveIncludedInMultiFromBlock ¶
func (db *Overlay) SaveIncludedInMultiFromBlock(block interfaces.DatabaseBlockWithEntries, checkForDuplicateEntries bool) error
func (*Overlay) SaveIncludedInMultiFromBlockMultiBatch ¶
func (db *Overlay) SaveIncludedInMultiFromBlockMultiBatch(block interfaces.DatabaseBlockWithEntries, checkForDuplicateEntries bool) error
func (*Overlay) SaveIncludedInMultiMultiBatch ¶
func (db *Overlay) SaveIncludedInMultiMultiBatch(entries []interfaces.IHash, block interfaces.IHash, checkForDuplicateEntries bool) error
func (*Overlay) SaveKeyValueStore ¶
func (db *Overlay) SaveKeyValueStore(kvs interfaces.BinaryMarshallable, key []byte) error
func (*Overlay) SavePaidFor ¶
func (db *Overlay) SavePaidFor(entry, ecEntry interfaces.IHash) error
func (*Overlay) SavePaidForMultiFromBlock ¶
func (db *Overlay) SavePaidForMultiFromBlock(block interfaces.IEntryCreditBlock, checkForDuplicateEntries bool) error
func (*Overlay) SavePaidForMultiFromBlockMultiBatch ¶
func (db *Overlay) SavePaidForMultiFromBlockMultiBatch(block interfaces.IEntryCreditBlock, checkForDuplicateEntries bool) error
func (*Overlay) SetBitcoinAnchorRecordPublicKeysFromHex ¶
func (*Overlay) SetChainHeads ¶
func (db *Overlay) SetChainHeads(primaryIndexes, chainIDs []interfaces.IHash) error
func (*Overlay) SetEthereumAnchorRecordPublicKeysFromHex ¶
func (*Overlay) SetExportData ¶
func (*Overlay) StartMultiBatch ¶
func (db *Overlay) StartMultiBatch()