Documentation ¶
Index ¶
- type GravitonStore
- func (g *GravitonStore) GetAllMiniblockDetails() map[string][]*structures.MBLInfo
- func (g *GravitonStore) GetAllNormalTxWithSCIDByAddr(addr string) (normTxsWithSCID []*structures.NormalTXWithSCIDParse)
- func (g *GravitonStore) GetAllNormalTxWithSCIDBySCID(scid string) (normTxsWithSCID []*structures.NormalTXWithSCIDParse)
- func (g *GravitonStore) GetAllOwnersAndSCIDs() map[string]string
- func (g *GravitonStore) GetAllSCIDInvokeDetails(scid string) (invokedetails []*structures.SCTXParse)
- func (g *GravitonStore) GetAllSCIDInvokeDetailsByEntrypoint(scid string, entrypoint string) (invokedetails []*structures.SCTXParse)
- func (g *GravitonStore) GetAllSCIDInvokeDetailsBySigner(scid string, signer string) (invokedetails []*structures.SCTXParse)
- func (g *GravitonStore) GetAllSCIDVariableDetails(scid string) map[int64][]*structures.SCIDVariable
- func (g *GravitonStore) GetGetInfoDetails() *structures.GetInfo
- func (g *GravitonStore) GetInteractionIndex(topoheight int64, heights []int64, rmax bool) (height int64)
- func (g *GravitonStore) GetInvalidSCIDDeploys() map[string]uint64
- func (g *GravitonStore) GetLastIndexHeight() int64
- func (g *GravitonStore) GetMiniblockCountByAddress(addr string) int64
- func (g *GravitonStore) GetMiniblockDetailsByHash(blid string) []*structures.MBLInfo
- func (g *GravitonStore) GetOwner(scid string) string
- func (g *GravitonStore) GetSCIDInteractionByAddr(addr string) (scids []string)
- func (g *GravitonStore) GetSCIDInteractionHeight(scid string) []int64
- func (g *GravitonStore) GetSCIDKeysByValue(scid string, val interface{}, height int64, rmax bool) (keysstring []string, keysuint64 []uint64)
- func (g *GravitonStore) GetSCIDValuesByKey(scid string, key interface{}, height int64, rmax bool) (valuesstring []string, valuesuint64 []uint64)
- func (g *GravitonStore) GetSCIDVariableDetailsAtTopoheight(scid string, topoheight int64) []*structures.SCIDVariable
- func (g *GravitonStore) GetTxCount(txType string) int64
- func (g *GravitonStore) StoreGetInfoDetails(getinfo *structures.GetInfo) error
- func (g *GravitonStore) StoreInvalidSCIDDeploys(scid string, fee uint64) error
- func (g *GravitonStore) StoreInvokeDetails(scid string, signer string, entrypoint string, topoheight int64, ...) error
- func (g *GravitonStore) StoreLastIndexHeight(last_indexedheight int64) error
- func (g *GravitonStore) StoreMiniblockCountByAddress(addr string) error
- func (g *GravitonStore) StoreMiniblockDetailsByHash(blid string, mbldetails []*structures.MBLInfo) error
- func (g *GravitonStore) StoreNormalTxWithSCIDByAddr(addr string, normTxWithSCID *structures.NormalTXWithSCIDParse) error
- func (g *GravitonStore) StoreOwner(scid string, owner string) error
- func (g *GravitonStore) StoreSCIDInteractionHeight(scid string, height int64) error
- func (g *GravitonStore) StoreSCIDVariableDetails(scid string, variables []*structures.SCIDVariable, topoheight int64) error
- func (g *GravitonStore) StoreTxCount(count int64, txType string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GravitonStore ¶
type GravitonStore struct { DB *graviton.Store DBFolder string DBPath string DBTrees []string DBMaxSnapshot uint64 DBMigrateWait time.Duration Writing int Closing bool // contains filtered or unexported fields }
func NewGravDB ¶
func NewGravDB(dbFolder, dbmigratewait string) *GravitonStore
---- Application Graviton/Backend functions ---- // Builds new Graviton DB based on input from main()
func NewGravDBRAM ¶
func NewGravDBRAM(dbmigratewait string) *GravitonStore
Builds new Graviton DB based on input from main() RAM store
func (*GravitonStore) GetAllMiniblockDetails ¶
func (g *GravitonStore) GetAllMiniblockDetails() map[string][]*structures.MBLInfo
Returns all miniblock details for synced chain
func (*GravitonStore) GetAllNormalTxWithSCIDByAddr ¶
func (g *GravitonStore) GetAllNormalTxWithSCIDByAddr(addr string) (normTxsWithSCID []*structures.NormalTXWithSCIDParse)
Returns all normal txs with SCIDs based on a given address
func (*GravitonStore) GetAllNormalTxWithSCIDBySCID ¶
func (g *GravitonStore) GetAllNormalTxWithSCIDBySCID(scid string) (normTxsWithSCID []*structures.NormalTXWithSCIDParse)
Returns all normal txs with SCIDs based on a given SCID
func (*GravitonStore) GetAllOwnersAndSCIDs ¶
func (g *GravitonStore) GetAllOwnersAndSCIDs() map[string]string
Returns all of the deployed SCIDs with their corresponding owners (who deployed it)
func (*GravitonStore) GetAllSCIDInvokeDetails ¶
func (g *GravitonStore) GetAllSCIDInvokeDetails(scid string) (invokedetails []*structures.SCTXParse)
Returns all scinvoke calls from a given scid
func (*GravitonStore) GetAllSCIDInvokeDetailsByEntrypoint ¶
func (g *GravitonStore) GetAllSCIDInvokeDetailsByEntrypoint(scid string, entrypoint string) (invokedetails []*structures.SCTXParse)
Retruns all scinvoke calls from a given scid that match a given entrypoint
func (*GravitonStore) GetAllSCIDInvokeDetailsBySigner ¶
func (g *GravitonStore) GetAllSCIDInvokeDetailsBySigner(scid string, signer string) (invokedetails []*structures.SCTXParse)
Returns all scinvoke calls from a given scid that match a given signer
func (*GravitonStore) GetAllSCIDVariableDetails ¶
func (g *GravitonStore) GetAllSCIDVariableDetails(scid string) map[int64][]*structures.SCIDVariable
Gets SC variables at all topoheights
func (*GravitonStore) GetGetInfoDetails ¶
func (g *GravitonStore) GetGetInfoDetails() *structures.GetInfo
Returns simple getinfo polling from the daemon
func (*GravitonStore) GetInteractionIndex ¶
func (g *GravitonStore) GetInteractionIndex(topoheight int64, heights []int64, rmax bool) (height int64)
func (*GravitonStore) GetInvalidSCIDDeploys ¶
func (g *GravitonStore) GetInvalidSCIDDeploys() map[string]uint64
Gets any SCIDs that were attempted to be deployed but not correct and their fees
func (*GravitonStore) GetLastIndexHeight ¶
func (g *GravitonStore) GetLastIndexHeight() int64
Gets gnomon's last indexed height - this is for stateful stores on close and reference on open
func (*GravitonStore) GetMiniblockCountByAddress ¶
func (g *GravitonStore) GetMiniblockCountByAddress(addr string) int64
Gets counts of miniblock finders by address
func (*GravitonStore) GetMiniblockDetailsByHash ¶
func (g *GravitonStore) GetMiniblockDetailsByHash(blid string) []*structures.MBLInfo
Returns the miniblocks within a given blid if previously stored
func (*GravitonStore) GetOwner ¶
func (g *GravitonStore) GetOwner(scid string) string
Returns the owner (who deployed it) of a given scid
func (*GravitonStore) GetSCIDInteractionByAddr ¶
func (g *GravitonStore) GetSCIDInteractionByAddr(addr string) (scids []string)
Gets all SCID interacts from a given address - non-builtin/name scids.
func (*GravitonStore) GetSCIDInteractionHeight ¶
func (g *GravitonStore) GetSCIDInteractionHeight(scid string) []int64
Gets SC interaction height and detail by a given SCID
func (*GravitonStore) GetSCIDKeysByValue ¶
func (g *GravitonStore) GetSCIDKeysByValue(scid string, val interface{}, height int64, rmax bool) (keysstring []string, keysuint64 []uint64)
Gets SC variable keys at given topoheight who's value equates to a given interface{} (string/uint64)
func (*GravitonStore) GetSCIDValuesByKey ¶
func (g *GravitonStore) GetSCIDValuesByKey(scid string, key interface{}, height int64, rmax bool) (valuesstring []string, valuesuint64 []uint64)
Gets SC values by key at given topoheight who's key equates to a given interface{} (string/uint64)
func (*GravitonStore) GetSCIDVariableDetailsAtTopoheight ¶
func (g *GravitonStore) GetSCIDVariableDetailsAtTopoheight(scid string, topoheight int64) []*structures.SCIDVariable
Gets SC variables at a given topoheight
func (*GravitonStore) GetTxCount ¶
func (g *GravitonStore) GetTxCount(txType string) int64
Gets gnomon's txcount by a given txType - this is for stateful stores on close and reference on open
func (*GravitonStore) StoreGetInfoDetails ¶
func (g *GravitonStore) StoreGetInfoDetails(getinfo *structures.GetInfo) error
Stores simple getinfo polling from the daemon
func (*GravitonStore) StoreInvalidSCIDDeploys ¶
func (g *GravitonStore) StoreInvalidSCIDDeploys(scid string, fee uint64) error
Stores any SCIDs that were attempted to be deployed but not correct - log scid/fees burnt attempting it.
func (*GravitonStore) StoreInvokeDetails ¶
func (g *GravitonStore) StoreInvokeDetails(scid string, signer string, entrypoint string, topoheight int64, invokedetails *structures.SCTXParse) error
Stores all scinvoke details of a given scid
func (*GravitonStore) StoreLastIndexHeight ¶
func (g *GravitonStore) StoreLastIndexHeight(last_indexedheight int64) error
Stores gnomon's last indexed height - this is for stateful stores on close and reference on open
func (*GravitonStore) StoreMiniblockCountByAddress ¶
func (g *GravitonStore) StoreMiniblockCountByAddress(addr string) error
Stores counts of miniblock finders by address
func (*GravitonStore) StoreMiniblockDetailsByHash ¶
func (g *GravitonStore) StoreMiniblockDetailsByHash(blid string, mbldetails []*structures.MBLInfo) error
Stores the miniblocks within a given blid
func (*GravitonStore) StoreNormalTxWithSCIDByAddr ¶
func (g *GravitonStore) StoreNormalTxWithSCIDByAddr(addr string, normTxWithSCID *structures.NormalTXWithSCIDParse) error
Stores all normal txs with SCIDs and their respective ring members for future balance/interaction reference
func (*GravitonStore) StoreOwner ¶
func (g *GravitonStore) StoreOwner(scid string, owner string) error
Stores the owner (who deployed it) of a given scid
func (*GravitonStore) StoreSCIDInteractionHeight ¶
func (g *GravitonStore) StoreSCIDInteractionHeight(scid string, height int64) error
Stores SC interaction height and detail - height invoked upon and type (scinstall/scinvoke). This is separate tree & k/v since we can query it for other things at less data retrieval
func (*GravitonStore) StoreSCIDVariableDetails ¶
func (g *GravitonStore) StoreSCIDVariableDetails(scid string, variables []*structures.SCIDVariable, topoheight int64) error
Stores SC variables at a given topoheight (called on any new scdeploy or scinvoke actions)
func (*GravitonStore) StoreTxCount ¶
func (g *GravitonStore) StoreTxCount(count int64, txType string) error
Stores gnomon's txcount by a given txType - this is for stateful stores on close and reference on open